Annotation of embedaddon/php/ext/spl/tests/bug36825.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #36825 (Exceptions thrown in ArrayObject::offsetGet cause segfault)
! 3: --FILE--
! 4: <?php
! 5:
! 6: class foo extends ArrayObject
! 7: {
! 8: public function offsetGet($key)
! 9: {
! 10: echo __METHOD__ . "($key)\n";
! 11: throw new Exception("hi");
! 12: }
! 13: }
! 14:
! 15: $test = new foo();
! 16:
! 17: try
! 18: {
! 19: var_dump($test['bar']);
! 20: }
! 21: catch (Exception $e)
! 22: {
! 23: echo "got exception\n";
! 24: }
! 25:
! 26: ?>
! 27: ===DONE===
! 28: --EXPECT--
! 29: foo::offsetGet(bar)
! 30: got exception
! 31: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>