summaryrefslogtreecommitdiff
path: root/utils/modules/icons.php
diff options
context:
space:
mode:
authordeva <deva>2009-04-28 18:10:16 +0000
committerdeva <deva>2009-04-28 18:10:16 +0000
commit39cf1d3a2741e979ee94ea94f479e173a4437067 (patch)
tree7bfba4f2babb6de19c22634df40d6fc3f8bd4d3e /utils/modules/icons.php
parent7bc354f572a23b5e7239995f06d3d10c1cd33c8a (diff)
Removed foreach warnings on empty arrays.
Diffstat (limited to 'utils/modules/icons.php')
-rw-r--r--utils/modules/icons.php14
1 files changed, 8 insertions, 6 deletions
diff --git a/utils/modules/icons.php b/utils/modules/icons.php
index 44df7e9..3a9d716 100644
--- a/utils/modules/icons.php
+++ b/utils/modules/icons.php
@@ -110,13 +110,15 @@ class Icons {
public function Icons($prefix)
{
$this->prefix = $prefix;
- $df = opendir($prefix);
- while(false !== ($file = readdir($df))) {
- if($file == '.' || $file == '..') continue;
- $icon = new Icon($file, $prefix);
- $this->icons[$file] = $icon;
+ if(is_dir($prefix)) {
+ $df = opendir($prefix);
+ while(false !== ($file = readdir($df))) {
+ if($file == '.' || $file == '..') continue;
+ $icon = new Icon($file, $prefix);
+ $this->icons[$file] = $icon;
+ }
+ closedir($df);
}
- closedir($df);
}
}