diff --git a/phpBB/phpbb/recursive_dot_prefix_filter_iterator.php b/phpBB/phpbb/recursive_dot_prefix_filter_iterator.php index 28e1067d11..6ef63ec906 100644 --- a/phpBB/phpbb/recursive_dot_prefix_filter_iterator.php +++ b/phpBB/phpbb/recursive_dot_prefix_filter_iterator.php @@ -22,6 +22,7 @@ class recursive_dot_prefix_filter_iterator extends \RecursiveFilterIterator { public function accept() { - return !$this->current()->isDir() || substr($this->current()->getFilename(), 0, 1) !== '.'; + $filename = $this->current()->getFilename(); + return !$this->current()->isDir() || $filename[0] !== '.'; } }