Fixed bogus PHP error
authorAlexander Ebert <ebert@woltlab.com>
Fri, 12 Apr 2013 19:16:38 +0000 (21:16 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 12 Apr 2013 19:16:38 +0000 (21:16 +0200)
Fixes #1200

wcfsetup/install/files/lib/system/style/StyleHandler.class.php

index c6943436bc70cabd0fab8235c59b315f7b0c61ee..f59c261165b80d11a3187dd6734ac8686cb30754 100644 (file)
@@ -166,14 +166,18 @@ class StyleHandler extends SingletonFactory {
        public static function resetStylesheets() {
                // frontend stylesheets
                $stylesheets = glob(WCF_DIR.'style/style-*.css');
-               foreach ($stylesheets as $stylesheet) {
-                       @unlink($stylesheet);
+               if ($stylesheets !== false) {
+                       foreach ($stylesheets as $stylesheet) {
+                               @unlink($stylesheet);
+                       }
                }
                
                // ACP stylesheets
                $stylesheets = glob(WCF_DIR.'acp/style/style*.css');
-               foreach ($stylesheets as $stylesheet) {
-                       @unlink($stylesheet);
+               if ($stylesheets !== false) {
+                       foreach ($stylesheets as $stylesheet) {
+                               @unlink($stylesheet);
+                       }
                }
        }
 }