dmitry Mon, 21 Sep 2009 13:32:10 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=288525
Log: Fixed tests/lang/bug22592.phpt Bug: http://bugs.php.net/22592 (Closed) Cascading assignments to strings with curly braces broken Changed paths: U php/php-src/branches/PHP_5_2/Zend/tests/bug41919.phpt U php/php-src/branches/PHP_5_2/Zend/zend_execute.c Modified: php/php-src/branches/PHP_5_2/Zend/tests/bug41919.phpt =================================================================== --- php/php-src/branches/PHP_5_2/Zend/tests/bug41919.phpt 2009-09-21 13:01:17 UTC (rev 288524) +++ php/php-src/branches/PHP_5_2/Zend/tests/bug41919.phpt 2009-09-21 13:32:10 UTC (rev 288525) @@ -8,6 +8,4 @@ echo "ok\n"; ?> --EXPECTF-- -Notice: Uninitialized string offset: 3 in %s on line %d - Fatal error: Cannot use string offset as an object in %sbug41919.php on line %d Modified: php/php-src/branches/PHP_5_2/Zend/zend_execute.c =================================================================== --- php/php-src/branches/PHP_5_2/Zend/zend_execute.c 2009-09-21 13:01:17 UTC (rev 288524) +++ php/php-src/branches/PHP_5_2/Zend/zend_execute.c 2009-09-21 13:32:10 UTC (rev 288525) @@ -1132,7 +1132,8 @@ break; } if (result) { - if (Z_LVAL_P(dim) < 0 || Z_STRLEN_P(container) <= Z_LVAL_P(dim)) { + if ((Z_LVAL_P(dim) < 0 || Z_STRLEN_P(container) <= Z_LVAL_P(dim)) && + (type == BP_VAR_R || type == BP_VAR_IS)) { zend_error(E_NOTICE, "Uninitialized string offset: %ld", Z_LVAL_P(dim)); } container = *container_ptr;
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php