]> granicus.if.org Git - php/commitdiff
- Add missing bug title and synch with other tests
authorMarcus Boerger <helly@php.net>
Thu, 23 Mar 2006 11:48:59 +0000 (11:48 +0000)
committerMarcus Boerger <helly@php.net>
Thu, 23 Mar 2006 11:48:59 +0000 (11:48 +0000)
ext/spl/tests/bug36825.phpt

index 5c633d022eb75fa3a3602f4640865aedf590afa8..35de013a8f0a750792b9f206c37eae11a98a4e59 100644 (file)
@@ -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===