empty($obj->getError())
Posted: Fri Oct 07, 2005 2:16 pm
I use $obj->getError() to check if there was an error in performing the last action. It returns the error (string) or an empty string if there was no error. It would be very convenient if I could use
but I can't since empty() only accepts plain vars. Is there a nice way to replace non-working empty($obj->getError()) with something that could check if $obj->getError() is empty string?
Code: Select all
if (!empty($obj->getError()))
{
//do error related stuff
}