[ticket/12268] Do not use substr but just compare the character

PHPBB3-12268
This commit is contained in:
Joas Schilling 2014-03-15 21:00:16 +01:00
parent dc0bcdf8a0
commit 584d7b5823

View file

@ -22,6 +22,7 @@ class recursive_dot_prefix_filter_iterator extends \RecursiveFilterIterator
{ {
public function accept() public function accept()
{ {
return !$this->current()->isDir() || substr($this->current()->getFilename(), 0, 1) !== '.'; $filename = $this->current()->getFilename();
return !$this->current()->isDir() || $filename[0] !== '.';
} }
} }