Zend hallucination
Posted on 2008-10-25 00:38:39 EEST.
No, I didn't drink any alcohol. And I didn't smoke any grass (though, I do not like it anyway). But this issue makes me...
Here's the code (PHP one):
$user = midgard_connection::get_user();
echo gettype($user);
var_dump($user);
The last line of midgard_connection::get_user() function is:
if(Z_TYPE_P(return_value) == IS_OBJECT)
g_warning("TYPE IS OBJECT");
In Zend, return_value is reserved name for variable which is returned from function. You can not return variables or values with some explicit return smth. You always have to use this predefined return_value variable.
Now, watch it very carefully. This is the output:
Warning: (pid:2703): TYPE IS OBJECT in /usr/share/midgard/setup/php/midgard_admin_sitewizard_creator_sitegroup.php on line 227
NULLNULL
So, Object became NULL in the middle of nowhere. Maybe this is a black hole from universe? And maybe even Paris Hilton brain?