I have a function that searches for and returns an object, but if the object isn’t found it returns FALSE (NULL gives same error btw).
The problem is that I want that object returned as a reference. However, if the object isn’t found and the return is FALSE or NULL it’s not allowed to pass it as refence. What to do?
Not exact php, just some short pseudo-example:
[php]
function getObject($findthis)
{
if ($findthis === TRUE) {
return $object;
} else {
return FALSE;
}
}
$obj =& getObject(“myobject”);
[/php]