mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Clarify that the get_properties handler is required
Some places were checking for non-null get_properties, some weren't. Make it clear that the handler is required and such checks are not necessary.
This commit is contained in:
parent
74d138e4a3
commit
f48ee1ff58
6 changed files with 8 additions and 17 deletions
|
@ -389,7 +389,7 @@ ZEND_API void zend_print_flat_zval_r(zval *expr) /* {{{ */
|
|||
break;
|
||||
case IS_OBJECT:
|
||||
{
|
||||
HashTable *properties = NULL;
|
||||
HashTable *properties;
|
||||
zend_string *class_name = Z_OBJ_HANDLER_P(expr, get_class_name)(Z_OBJ_P(expr));
|
||||
zend_printf("%s Object (", ZSTR_VAL(class_name));
|
||||
zend_string_release_ex(class_name, 0);
|
||||
|
@ -399,9 +399,7 @@ ZEND_API void zend_print_flat_zval_r(zval *expr) /* {{{ */
|
|||
return;
|
||||
}
|
||||
|
||||
if (Z_OBJ_HANDLER_P(expr, get_properties)) {
|
||||
properties = Z_OBJPROP_P(expr);
|
||||
}
|
||||
properties = Z_OBJPROP_P(expr);
|
||||
if (properties) {
|
||||
Z_PROTECT_RECURSION_P(expr);
|
||||
print_flat_hash(properties);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue