I've run into the same thing with PHP-GTK. While Zend engine itself may check for existence of handler, PHP code does not.

-Andrei


On Jan 27, 2006, at 8:47 AM, Rob Richards wrote:

Is it required that the get_properties handler be implemented for an object?

In the source there are places that it tests if it is implemented and then tests the returned value in the event it is NULL. The problem is that this is not consistent throughout the zend and php source and I'm getting crashes on certain calls.

For example:
calling var_dump in var.c: Z_OBJPROP_PP is used without testing if implemented so the handler is required otherwise crash. get_object_vars in zend_builtin_functions.c: checks to see if it is implemented, but doesn't test the return value in the case of NULL.

I assume checks for both the handler existing and the return value possibly being NULL are what should be used throughout the code, but wanted to check on that first.

Rob

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to