mirror of
https://github.com/php/php-src.git
synced 2024-09-23 02:47:26 +00:00
Check for get_properties handler before using it. (Patch from
rrichards@ctindustries.net).
This commit is contained in:
parent
6a158cf60d
commit
ef4c06c083
@ -814,11 +814,16 @@ ZEND_FUNCTION(get_object_vars)
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
properties = Z_OBJ_HT_PP(obj)->get_properties(*obj TSRMLS_CC);
|
||||
|
||||
if (properties == NULL) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
instanceof = EG(This) && instanceof_function(Z_OBJCE_P(EG(This)), Z_OBJCE_PP(obj) TSRMLS_CC);
|
||||
|
||||
array_init(return_value);
|
||||
|
||||
properties = Z_OBJ_HT_PP(obj)->get_properties(*obj TSRMLS_CC);
|
||||
zend_hash_internal_pointer_reset_ex(properties, &pos);
|
||||
|
||||
while (zend_hash_get_current_data_ex(properties, (void **) &value, &pos) == SUCCESS) {
|
||||
|
Loading…
Reference in New Issue
Block a user