cvs: ZendEngine2(PHP_5_3) / zend_compile.c /tests bug38469.phpt

From: Date: Sun, 23 Nov 2008 20:35:16 +0000
Subject: cvs: ZendEngine2(PHP_5_3) / zend_compile.c /tests bug38469.phpt
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-7228@lists.php.net to get a copy of this message
lbarnaud Sun Nov 23 20:35:16 2008 UTC Modified files: (Branch: PHP_5_3) /ZendEngine2 zend_compile.c /ZendEngine2/tests bug38469.phpt Log: MFH: Fixed bug #46649 (Setting array element with that same array produces inconsistent results) http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_compile.c?r1=1.647.2.27.2.41.2.92&r2=1.647.2.27.2.41.2.93&diff_format=u Index: ZendEngine2/zend_compile.c diff -u ZendEngine2/zend_compile.c:1.647.2.27.2.41.2.92 ZendEngine2/zend_compile.c:1.647.2.27.2.41.2.93 --- ZendEngine2/zend_compile.c:1.647.2.27.2.41.2.92 Wed Nov 12 00:44:56 2008 +++ ZendEngine2/zend_compile.c Sun Nov 23 20:35:16 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_compile.c,v 1.647.2.27.2.41.2.92 2008/11/12 00:44:56 stas Exp $ */ +/* $Id: zend_compile.c,v 1.647.2.27.2.41.2.93 2008/11/23 20:35:16 lbarnaud Exp $ */ #include <zend_language_parser.h> #include "zend.h" @@ -583,6 +583,7 @@ CG(active_op_array)->vars[value->u.var].name, CG(active_op_array)->vars[value->u.var].name_len, 1); SET_UNUSED(opline->op2); + opline->op2.u.EA.type = ZEND_FETCH_LOCAL; value = &opline->result; } } http://cvs.php.net/viewvc.cgi/ZendEngine2/tests/bug38469.phpt?r1=1.1.2.3&r2=1.1.2.4&diff_format=u Index: ZendEngine2/tests/bug38469.phpt diff -u ZendEngine2/tests/bug38469.phpt:1.1.2.3 ZendEngine2/tests/bug38469.phpt:1.1.2.4 --- ZendEngine2/tests/bug38469.phpt:1.1.2.3 Sat May 24 15:55:18 2008 +++ ZendEngine2/tests/bug38469.phpt Sun Nov 23 20:35:16 2008 @@ -8,6 +8,16 @@ $b = array(array()); $b[0][0] = $b; var_dump($b); + +function f() { + $a = array(); + $a[0] = $a; + var_dump($a); + $b = array(array()); + $b[0][0] = $b; + var_dump($b); +} +f(); ?> --EXPECT-- array(1) { @@ -26,3 +36,19 @@ } } } +array(1) { + [0]=> + array(0) { + } +} +array(1) { + [0]=> + array(1) { + [0]=> + array(1) { + [0]=> + array(0) { + } + } + } +}

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