2006-03-23 07:10:59 +08:00
|
|
|
--TEST--
|
2006-03-23 19:48:59 +08:00
|
|
|
Bug #36825 (Exceptions thrown in ArrayObject::offsetGet cause segfault)
|
2006-03-23 07:10:59 +08:00
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
|
2006-03-23 19:48:59 +08:00
|
|
|
class foo extends ArrayObject
|
|
|
|
{
|
|
|
|
public function offsetGet($key)
|
|
|
|
{
|
|
|
|
echo __METHOD__ . "($key)\n";
|
2006-03-23 07:10:59 +08:00
|
|
|
throw new Exception("hi");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-03-23 19:48:59 +08:00
|
|
|
$test = new foo();
|
|
|
|
|
|
|
|
try
|
|
|
|
{
|
2006-03-23 07:10:59 +08:00
|
|
|
var_dump($test['bar']);
|
2006-03-23 19:48:59 +08:00
|
|
|
}
|
|
|
|
catch (Exception $e)
|
|
|
|
{
|
2006-03-23 07:10:59 +08:00
|
|
|
echo "got exception\n";
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|
2006-03-23 19:48:59 +08:00
|
|
|
===DONE===
|
2006-03-23 07:10:59 +08:00
|
|
|
--EXPECT--
|
2006-03-23 19:48:59 +08:00
|
|
|
foo::offsetGet(bar)
|
2006-03-23 07:10:59 +08:00
|
|
|
got exception
|
2006-03-23 19:48:59 +08:00
|
|
|
===DONE===
|