diff options
Diffstat (limited to 'phpBB/includes/acp/acp_icons.php')
-rw-r--r-- | phpBB/includes/acp/acp_icons.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/phpBB/includes/acp/acp_icons.php b/phpBB/includes/acp/acp_icons.php index 97864d0e27..537c0425a2 100644 --- a/phpBB/includes/acp/acp_icons.php +++ b/phpBB/includes/acp/acp_icons.php @@ -89,15 +89,17 @@ class acp_icons } unset($imglist); - $dir = @opendir($phpbb_root_path . $img_path); - while (($file = @readdir($dir)) !== false) + if ($dir = @opendir($phpbb_root_path . $img_path)) { - if (is_file($phpbb_root_path . $img_path . '/' . $file) && preg_match('#\.pak$#i', $file)) + while (($file = readdir($dir)) !== false) { - $_paks[] = $file; + if (is_file($phpbb_root_path . $img_path . '/' . $file) && preg_match('#\.pak$#i', $file)) + { + $_paks[] = $file; + } } + closedir($dir); } - @closedir($dir); } // What shall we do today? Oops, I believe that's trademarked ... |