summaryrefslogtreecommitdiff
path: root/ext/spl/tests/bug36258.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/spl/tests/bug36258.phpt')
-rw-r--r--ext/spl/tests/bug36258.phpt19
1 files changed, 19 insertions, 0 deletions
diff --git a/ext/spl/tests/bug36258.phpt b/ext/spl/tests/bug36258.phpt
new file mode 100644
index 0000000..60817d0
--- /dev/null
+++ b/ext/spl/tests/bug36258.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Bug #36258 (SplFileObject::getPath() may lead to segfault)
+--FILE--
+<?php
+
+$diriter = new RecursiveIteratorIterator( new RecursiveDirectoryIterator('.') );
+
+foreach ($diriter as $key => $file) {
+ var_dump($file->getFilename());
+ var_dump($file->getPath());
+ break;
+}
+
+?>
+===DONE===
+--EXPECTF--
+string(%d) "%s"
+string(%d) "%s"
+===DONE===