Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix tests

  • Loading branch information...
commit d36263b7bb37bfa14c1bbc8404bfc26fa0b91956 1 parent 066879f
@smalyshev smalyshev authored
Showing with 9 additions and 5 deletions.
  1. +2 −2 tests/lang/bug19943.phpt
  2. +7 −3 tests/strings/offsets_general.phpt
View
4 tests/lang/bug19943.phpt
@@ -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];
View
10 tests/strings/offsets_general.phpt
@@ -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)
Please sign in to comment.
Something went wrong with that request. Please try again.