Skip to content

Commit 1bc65f2

Browse files
committed
Make sure the guard actually keeps working in a different context
1 parent 95d28fd commit 1bc65f2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Zend/tests/gh14983.phpt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ class A {
1414
if ($loop) {
1515
while (true) {}
1616
}
17-
return $name;
17+
echo __METHOD__, "\n";
18+
return $this->{$name};
1819
}
1920
}
2021

@@ -35,4 +36,7 @@ $a->foo;
3536
?>
3637
--EXPECTF--
3738
Fatal error: Maximum execution time of 1 second exceeded in %s on line %d
38-
string(3) "foo"
39+
A::__get
40+
41+
Warning: Undefined property: A::$foo in %s on line %d
42+
NULL

0 commit comments

Comments
 (0)