Permalink
Browse files

[ticket/10323] make finder work with PHP 5.2

PHPBB3-10323
  • Loading branch information...
igorw committed Nov 19, 2011
1 parent b7c4fb3 commit 658db65cb477b790f217e0b8c6d202fbb1a8836c
Showing with 6 additions and 1 deletion.
  1. +6 −1 phpBB/includes/extension/finder.php
@@ -377,9 +377,14 @@ public function find($cache = true, $is_dir = false)
}
$directory_pattern = '#' . $directory_pattern . '#';
- $iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path, FilesystemIterator::SKIP_DOTS), RecursiveIteratorIterator::SELF_FIRST);
+ $iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path), RecursiveIteratorIterator::SELF_FIRST);
foreach ($iterator as $file_info)
{
+ if (in_array($file_info, array('.', '..')))
+ {
+ continue;
+ }
+
if ($file_info->isDir() == $is_dir)
{
if ($is_dir)

0 comments on commit 658db65

Please sign in to comment.