summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorXinchen Hui <laruence@php.net>2013-02-17 11:05:34 +0800
committerXinchen Hui <laruence@php.net>2013-02-17 11:05:34 +0800
commit263accb626759c92510817cd565885106aa07f4d (patch)
tree85e1900f218bd534debac2e4ecfd01e94536f696 /ext
parent375e3c273b5219e9937c179ed59d551fdce4e540 (diff)
parent01ae5c3c2ff47ca66031ec4a750a30d97c64c492 (diff)
downloadphp-git-263accb626759c92510817cd565885106aa07f4d.tar.gz
Merge branch 'PHP-5.3' into PHP-5.4
Diffstat (limited to 'ext')
-rw-r--r--ext/spl/tests/bug64228.phpt25
1 files changed, 25 insertions, 0 deletions
diff --git a/ext/spl/tests/bug64228.phpt b/ext/spl/tests/bug64228.phpt
new file mode 100644
index 0000000000..3f30dd2b23
--- /dev/null
+++ b/ext/spl/tests/bug64228.phpt
@@ -0,0 +1,25 @@
+--TEST--
+Bug #64228 (RecursiveDirectoryIterator always assumes SKIP_DOTS)
+--FILE--
+<?php
+$dirs = array();
+$empty_dir = __DIR__ . "/empty";
+@mkdir($empty_dir);
+
+$i = new RecursiveDirectoryIterator($empty_dir, FilesystemIterator::KEY_AS_PATHNAME | FilesystemIterator::CURRENT_AS_FILEINFO); // Note the absence of FilesystemIterator::SKIP_DOTS
+foreach ($i as $key => $value) {
+ $dirs[] = $value->getFileName();
+}
+
+@rmdir($empty_dir);
+
+sort($dirs);
+print_r($dirs);
+?>
+--EXPECT--
+Array
+(
+ [0] => .
+ [1] => ..
+)
+