cvs: ZendEngine2 / zend_builtin_functions.c

From: Date: Tue, 03 Aug 2004 16:59:25 +0000
Subject: cvs: ZendEngine2 / zend_builtin_functions.c
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-2842@lists.php.net to get a copy of this message
helly Tue Aug 3 12:59:25 2004 EDT Modified files: /ZendEngine2 zend_builtin_functions.c Log: - Fixed Bug #29505 get_class_vars() severely broken when used with arrays http://cvs.php.net/diff.php/ZendEngine2/zend_builtin_functions.c?r1=1.242&r2=1.243&ty=u Index: ZendEngine2/zend_builtin_functions.c diff -u ZendEngine2/zend_builtin_functions.c:1.242 ZendEngine2/zend_builtin_functions.c:1.243 --- ZendEngine2/zend_builtin_functions.c:1.242 Mon Jul 26 21:33:25 2004 +++ ZendEngine2/zend_builtin_functions.c Tue Aug 3 12:59:25 2004 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_builtin_functions.c,v 1.242 2004/07/27 01:33:25 wez Exp $ */ +/* $Id: zend_builtin_functions.c,v 1.243 2004/08/03 16:59:25 helly Exp $ */ #include "zend.h" #include "zend_API.h" @@ -702,6 +702,12 @@ zval_copy_ctor(prop_copy); INIT_PZVAL(prop_copy); + /* this is necessary to make it able to work with default array + * properties, returned to user */ + if (Z_TYPE_P(prop_copy) == IS_CONSTANT_ARRAY || Z_TYPE_P(prop_copy) == IS_CONSTANT) { + zval_update_constant(&prop_copy, 0 TSRMLS_CC); + } + add_assoc_zval(return_value, prop_name, prop_copy); } }

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