helly Thu Mar 23 11:48:59 2006 UTC Modified files: (Branch: PHP_5_1) /php-src/ext/spl/tests bug36825.phpt Log: - Add missing bug title and synch with other tests http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/tests/bug36825.phpt?r1=1.1.2.1&r2=1.1.2.2&diff_format=u Index: php-src/ext/spl/tests/bug36825.phpt diff -u php-src/ext/spl/tests/bug36825.phpt:1.1.2.1 php-src/ext/spl/tests/bug36825.phpt:1.1.2.2 --- php-src/ext/spl/tests/bug36825.phpt:1.1.2.1 Wed Mar 22 23:10:59 2006 +++ php-src/ext/spl/tests/bug36825.phpt Thu Mar 23 11:48:59 2006 @@ -1,26 +1,31 @@ --TEST-- -Bug #36825 () +Bug #36825 (Exceptions thrown in ArrayObject::offsetGet cause segfault) --FILE-- <?php -class foo extends ArrayObject { - public function __construct() { - } - - public function offsetGet($key) { +class foo extends ArrayObject +{ + public function offsetGet($key) + { + echo __METHOD__ . "($key)\n"; throw new Exception("hi"); } } -$test=new foo(); -try{ +$test = new foo(); + +try +{ var_dump($test['bar']); -} catch (Exception $e) { +} +catch (Exception $e) +{ echo "got exception\n"; } -echo "Done\n"; ?> +===DONE=== --EXPECT-- +foo::offsetGet(bar) got exception -Done +===DONE===
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php