Add test case for bug #26866

This commit is contained in:
foobar 2004-02-10 12:58:36 +00:00
parent 91ee6c0ceb
commit 6529000fff

25
tests/lang/bug26866.phpt Normal file
View File

@ -0,0 +1,25 @@
--TEST--
Bug #26866 (segfault when exception raised in __get)
--FILE--
<?php
class bar {
function get_name() {
return 'bar';
}
}
class foo {
function __get($sName) {
throw new Exception('Exception!');
return new bar();
}
}
$foo = new foo();
try {
echo $foo->bar->get_name();
}
catch (Exception $E) {
echo "Exception raised!\n";
}
?>
--EXPECT--
Exception raised!