From 953d688924942b03e02a8b34157de5f27ae281c9 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Fri, 3 Nov 2017 14:11:27 +0100 Subject: [PATCH] Work-around for `glob()` returning false --- .../install/files/lib/system/style/StyleCompiler.class.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/lib/system/style/StyleCompiler.class.php b/wcfsetup/install/files/lib/system/style/StyleCompiler.class.php index 81ca3354a8..87ee5c9258 100644 --- a/wcfsetup/install/files/lib/system/style/StyleCompiler.class.php +++ b/wcfsetup/install/files/lib/system/style/StyleCompiler.class.php @@ -233,8 +233,11 @@ class StyleCompiler extends SingletonFactory { $files = []; $basePath = FileUtil::addTrailingSlash(FileUtil::getRealPath(WCF_DIR . $application->getPackage()->packageDir)) . 'acp/style/'; - foreach (glob($basePath . '*.scss') as $file) { - $files[] = $file; + $result = glob($basePath . '*.scss'); + if (is_array($result)) { + foreach ($result as $file) { + $files[] = $file; + } } return $files; -- 2.20.1