aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp/acp_icons.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2007-10-21 11:26:24 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2007-10-21 11:26:24 +0000
commit19d3483c3824c4d4859e8f14a50cb57d97577938 (patch)
tree63d6d648c9ca9e4b10ab6ec34955e5eae5afa0c5 /phpBB/includes/acp/acp_icons.php
parent1006e76733d4af412f7ec45301f82c034671d65f (diff)
downloadforums-19d3483c3824c4d4859e8f14a50cb57d97577938.tar
forums-19d3483c3824c4d4859e8f14a50cb57d97577938.tar.gz
forums-19d3483c3824c4d4859e8f14a50cb57d97577938.tar.bz2
forums-19d3483c3824c4d4859e8f14a50cb57d97577938.tar.xz
forums-19d3483c3824c4d4859e8f14a50cb57d97577938.zip
make sure we always check for a valid directory handle
git-svn-id: file:///svn/phpbb/trunk@8211 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/acp/acp_icons.php')
-rw-r--r--phpBB/includes/acp/acp_icons.php12
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 ...