]> granicus.if.org Git - php/commitdiff
add test for bug #36258
authorAntony Dovgal <tony2001@php.net>
Thu, 2 Feb 2006 13:56:16 +0000 (13:56 +0000)
committerAntony Dovgal <tony2001@php.net>
Thu, 2 Feb 2006 13:56:16 +0000 (13:56 +0000)
ext/spl/tests/bug36258.phpt [new file with mode: 0644]

diff --git a/ext/spl/tests/bug36258.phpt b/ext/spl/tests/bug36258.phpt
new file mode 100644 (file)
index 0000000..76fbdbf
--- /dev/null
@@ -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;
+}
+
+echo "Done\n";
+?>
+--EXPECTF--    
+string(%d) "%s"
+string(%d) "%s"
+Done