mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
Add test case for bug #26866
This commit is contained in:
parent
91ee6c0ceb
commit
6529000fff
25
tests/lang/bug26866.phpt
Normal file
25
tests/lang/bug26866.phpt
Normal 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!
|
Loading…
Reference in New Issue
Block a user