summaryrefslogtreecommitdiff
path: root/ext/spl/tests/bug41828.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/spl/tests/bug41828.phpt')
-rw-r--r--ext/spl/tests/bug41828.phpt21
1 files changed, 21 insertions, 0 deletions
diff --git a/ext/spl/tests/bug41828.phpt b/ext/spl/tests/bug41828.phpt
new file mode 100644
index 000000000..6053e0e44
--- /dev/null
+++ b/ext/spl/tests/bug41828.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Bug #41828 (Segfault if extended constructor of RecursiveIterator doesn't call its parent)
+--FILE--
+<?php
+class foo extends RecursiveIteratorIterator {
+
+ public function __construct($str) {
+ }
+
+ public function bar() {
+ }
+}
+
+$foo = new foo("This is bar");
+echo $foo->bar();
+
+?>
+==DONE==
+<?php exit(0); ?>
+--EXPECTF--
+Fatal error: main(): The foo instance wasn't initialized properly in %s on line %d