cvs: ZendEngine2 / zend_builtin_functions.c

From: Date: Tue, 07 Feb 2006 00:32:16 +0000
Subject: cvs: ZendEngine2 / zend_builtin_functions.c
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-4573@lists.php.net to get a copy of this message
andrei Tue Feb 7 00:32:16 2006 UTC Modified files: /ZendEngine2 zend_builtin_functions.c Log: Check for get_properties handler before using it. (Patch from rrichards@ctindustries.net). http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_builtin_functions.c?r1=1.301&r2=1.302&diff_format=u Index: ZendEngine2/zend_builtin_functions.c diff -u ZendEngine2/zend_builtin_functions.c:1.301 ZendEngine2/zend_builtin_functions.c:1.302 --- ZendEngine2/zend_builtin_functions.c:1.301 Fri Feb 3 13:24:26 2006 +++ ZendEngine2/zend_builtin_functions.c Tue Feb 7 00:32:16 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_builtin_functions.c,v 1.301 2006/02/03 13:24:26 tony2001 Exp $ */ +/* $Id: zend_builtin_functions.c,v 1.302 2006/02/07 00:32:16 andrei Exp $ */ #include "zend.h" #include "zend_API.h" @@ -814,11 +814,16 @@ 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) {

« previous php.zend-engine.cvs (#4573) next »