]> granicus.if.org Git - php/commitdiff
Fixed tests/lang/bug22592.phpt
authorDmitry Stogov <dmitry@php.net>
Mon, 21 Sep 2009 13:32:10 +0000 (13:32 +0000)
committerDmitry Stogov <dmitry@php.net>
Mon, 21 Sep 2009 13:32:10 +0000 (13:32 +0000)
Zend/tests/bug41919.phpt
Zend/zend_execute.c

index 2c4f985ebb0ec282ef02a36ec277a0fc18a9bba7..0ac3276b076d9052d368258929113c1b8389b3ca 100644 (file)
@@ -8,6 +8,4 @@ $foo[3]->bar[1] = "bang";
 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
index 6fe169784c76747f2bb3c4ee371fabc7698c4a6c..76913f53d3d3f0e5724b1b0c0ecf85f334883f52 100644 (file)
@@ -1132,7 +1132,8 @@ static void zend_fetch_dimension_address(temp_variable *result, zval **container
                                                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;