cvs: ZendEngine2(PHP_5_0) / zend_execute.c /tests bug34064.phpt php-src NEWS

From: Date: Wed, 10 Aug 2005 10:37:25 +0000
Subject: cvs: ZendEngine2(PHP_5_0) / zend_execute.c /tests bug34064.phpt php-src NEWS
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-3981@lists.php.net to get a copy of this message
dmitry Wed Aug 10 06:37:25 2005 EDT Added files: (Branch: PHP_5_0) /ZendEngine2/tests bug34064.phpt Modified files: /php-src NEWS /ZendEngine2 zend_execute.c Log: Fixed bug #34064 (arr[] as param to function is allowed only if function receives argument by reference) http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1760.2.460&r2=1.1760.2.461&ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.1760.2.460 php-src/NEWS:1.1760.2.461 --- php-src/NEWS:1.1760.2.460 Wed Aug 10 04:23:51 2005 +++ php-src/NEWS Wed Aug 10 06:37:23 2005 @@ -19,6 +19,8 @@ - Fixed memory corruption in ImageTTFText() with 64bit systems. (Andrey) - Fixed memory corruption in stristr(). (Derick) - Fixed segfaults when CURL callback functions throw exception. (Tony) +- Fixed bug #34064 (arr[] as param to function is allowed only if function + receives argument by reference). (Dmitry) - Fixed bug #33989 (extract($GLOBALS,EXTR_REFS) crashes PHP). (Dmitry) - Fixed bug #33940 (array_map() fails to pass by reference when called recursively). (Dmitry) http://cvs.php.net/diff.php/ZendEngine2/zend_execute.c?r1=1.652.2.46&r2=1.652.2.47&ty=u Index: ZendEngine2/zend_execute.c diff -u ZendEngine2/zend_execute.c:1.652.2.46 ZendEngine2/zend_execute.c:1.652.2.47 --- ZendEngine2/zend_execute.c:1.652.2.46 Mon Jul 18 03:41:10 2005 +++ ZendEngine2/zend_execute.c Wed Aug 10 06:37:23 2005 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_execute.c,v 1.652.2.46 2005/07/18 07:41:10 dmitry Exp $ */ +/* $Id: zend_execute.c,v 1.652.2.47 2005/08/10 10:37:23 dmitry Exp $ */ #define ZEND_INTENSIVE_DEBUGGING 0 @@ -2131,6 +2131,9 @@ /* Behave like FETCH_DIM_W */ zend_fetch_dimension_address(&opline->result, &opline->op1, &opline->op2, EX(Ts), BP_VAR_W TSRMLS_CC); } else { + if (opline->op2.op_type == IS_UNUSED) { + zend_error(E_ERROR, "Cannot use [] for reading"); + } /* Behave like FETCH_DIM_R, except for locking used for list() */ zend_fetch_dimension_address(&opline->result, &opline->op1, &opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC); AI_USE_PTR(EX_T(opline->result.u.var).var); http://cvs.php.net/co.php/ZendEngine2/tests/bug34064.phpt?r=1.1&p=1 Index: ZendEngine2/tests/bug34064.phpt +++ ZendEngine2/tests/bug34064.phpt

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