PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
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
if (!empty($obj->getError()))
{
//do error related stuff
}
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?