diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2018-10-04 10:56:43 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2018-10-04 12:46:50 +0200 |
commit | f48ee1ff58da5cb2aadf617b6f0c34cd2a7a973c (patch) | |
tree | e2bb7ee855a67a5760482c88ed8074a766c7001d /Zend/zend.c | |
parent | 74d138e4a3c0cb408112d23b88ccb0e4a8571c48 (diff) | |
download | php-git-f48ee1ff58da5cb2aadf617b6f0c34cd2a7a973c.tar.gz |
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.
Diffstat (limited to 'Zend/zend.c')
-rw-r--r-- | Zend/zend.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Zend/zend.c b/Zend/zend.c index 6a53e60aa1..ee88afed02 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -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); |