From: Dmitry Stogov Date: Mon, 9 Jul 2007 08:53:14 +0000 (+0000) Subject: Fixed bug #41919 X-Git-Tag: php-5.2.4RC1~219 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9f62beabfd2bfe0a56c71dd582d6ec64d0cf046c;p=php Fixed bug #41919 --- diff --git a/Zend/tests/bug41919.phpt b/Zend/tests/bug41919.phpt index 127eb97bc1..3ba9ae0ec4 100644 --- a/Zend/tests/bug41919.phpt +++ b/Zend/tests/bug41919.phpt @@ -8,5 +8,4 @@ $foo[3]->bar[1] = "bang"; echo "ok\n"; ?> --EXPECTF-- -Warning: Cannot use string offset as an array in %s/bug41919.php on line %d -ok +Fatal error: Cannot use string offset as an object in %s/bug41919.php on line %d diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 6214837cd2..5ff01f510a 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -1234,6 +1234,10 @@ static void zend_fetch_property_address(temp_variable *result, zval **container_ { zval *container; + if (!container_ptr) { + zend_error_noreturn(E_ERROR, "Cannot use string offset as an object"); + } + container = *container_ptr; if (container == EG(error_zval_ptr)) { if (result) {