From 5b46469c6484719b93309c3dfba5a7b2602265f6 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Fri, 12 Apr 2013 21:16:38 +0200 Subject: [PATCH] Fixed bogus PHP error Fixes #1200 --- .../files/lib/system/style/StyleHandler.class.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/wcfsetup/install/files/lib/system/style/StyleHandler.class.php b/wcfsetup/install/files/lib/system/style/StyleHandler.class.php index c6943436bc..f59c261165 100644 --- a/wcfsetup/install/files/lib/system/style/StyleHandler.class.php +++ b/wcfsetup/install/files/lib/system/style/StyleHandler.class.php @@ -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); + } } } } -- 2.20.1