]> granicus.if.org Git - php/commitdiff
fix tests
authorStanislav Malyshev <stas@php.net>
Mon, 26 Dec 2011 01:08:47 +0000 (01:08 +0000)
committerStanislav Malyshev <stas@php.net>
Mon, 26 Dec 2011 01:08:47 +0000 (01:08 +0000)
tests/lang/bug19943.phpt
tests/strings/offsets_general.phpt

index 294a320bf7cbfa6fd31135598fc4f26335ee58ab..c9511905119712126406ee011d549a9a069b1fdd 100644 (file)
@@ -5,11 +5,11 @@ Bug #19943 (memleaks)
        $ar = array();
        for ($count = 0; $count < 10; $count++) {
                $ar[$count]        = "$count";
-               $ar[$count]['idx'] = "$count";
+               @$ar[$count]['idx'] = "$count";
        }
 
        for ($count = 0; $count < 10; $count++) {
-               echo $ar[$count]." -- ".$ar[$count]['idx']."\n";
+               echo $ar[$count]." -- ".@$ar[$count]['idx']."\n";
        }
        $a = "0123456789";
        $a[9] = $a[0];
index 3ad779d2d1afdbc2134896d6075b1a657646537c..9d69ea2bf5fec2e3f5c92e1ca8d43b9bfe01860c 100644 (file)
@@ -18,17 +18,21 @@ var_dump(isset($string{0}{0}));
 var_dump($string{"foo"});
 var_dump(isset($string{"foo"}{"bar"}));
 ?>
---EXPECT--
+--EXPECTF--
 string(1) "f"
 string(1) "o"
 bool(true)
 bool(true)
+
+Warning: Illegal string offset 'foo' in %s line %d
 string(1) "f"
-bool(true)
+bool(false)
 string(1) "f"
 string(1) "o"
 bool(true)
 bool(true)
+
+Warning: Illegal string offset 'foo' in %s line %d
 string(1) "f"
-bool(true)
+bool(false)