diff options
| author | Andrei Zmievski <andrei@php.net> | 2006-02-07 00:32:16 +0000 |
|---|---|---|
| committer | Andrei Zmievski <andrei@php.net> | 2006-02-07 00:32:16 +0000 |
| commit | ef4c06c0837dda07cd346654ceac6e3be4eb5b22 (patch) | |
| tree | 07109a4b59f4398e4f6b3b04ca13d7f7b22f1f8d /Zend/zend_builtin_functions.c | |
| parent | 6a158cf60dfe8d3b66fdd18eece5897eb2c838db (diff) | |
| download | php-git-ef4c06c0837dda07cd346654ceac6e3be4eb5b22.tar.gz | |
Check for get_properties handler before using it. (Patch from
rrichards@ctindustries.net).
Diffstat (limited to 'Zend/zend_builtin_functions.c')
| -rw-r--r-- | Zend/zend_builtin_functions.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index 13fdc96e1d..95dc9efc35 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -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) { |
