From 584d7b5823e8c959e921dc5b154bf535182fc32d Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Sat, 15 Mar 2014 21:00:16 +0100 Subject: [PATCH] [ticket/12268] Do not use substr but just compare the character PHPBB3-12268 --- phpBB/phpbb/recursive_dot_prefix_filter_iterator.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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] !== '.'; } }