diff --git a/phpBB/phpbb/extension/manager.php b/phpBB/phpbb/extension/manager.php index b22fbf07a6..604f680af2 100644 --- a/phpBB/phpbb/extension/manager.php +++ b/phpBB/phpbb/extension/manager.php @@ -409,8 +409,13 @@ class manager } $iterator = new \RecursiveIteratorIterator( - new \RecursiveDirectoryIterator($this->phpbb_root_path . 'ext/', \FilesystemIterator::NEW_CURRENT_AND_KEY | \FilesystemIterator::FOLLOW_SYMLINKS), - \RecursiveIteratorIterator::SELF_FIRST); + new \phpbb\recursive_dot_prefix_filter_iterator( + new \RecursiveDirectoryIterator($this->phpbb_root_path . 'ext/', \FilesystemIterator::NEW_CURRENT_AND_KEY | \FilesystemIterator::FOLLOW_SYMLINKS) + ), + \RecursiveIteratorIterator::SELF_FIRST + ); + $iterator->setMaxDepth(2); + foreach ($iterator as $file_info) { if ($file_info->isFile() && $file_info->getFilename() == 'ext.' . $this->php_ext)