Here's a patch against HEAD for get_object_vars in
zend_builtin_functions.c that checks for the return value of the
handler. With this change it should at least now be safe to implement
the handler and return NULL, as this was the only spot I found in the
engine that checked only for the existence of the handler and not the
return value.
One question I have about this function is why RETURN_FALSE is used when
the handler is not implemented or NULL is returned (with patch). I can
understand it being returned when used on a non-object, but the function
is supposed to return an array, so I would think and empty array should
be returned instead.
Rob
Andrei Zmievski wrote: