Work-around for `glob()` returning false
authorAlexander Ebert <ebert@woltlab.com>
Fri, 3 Nov 2017 13:11:27 +0000 (14:11 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 3 Nov 2017 13:11:27 +0000 (14:11 +0100)
wcfsetup/install/files/lib/system/style/StyleCompiler.class.php

index 81ca3354a8e49040813c361254b8d3cc8a4e9f78..87ee5c9258bdf7b960efe0ba8343debcc2f9052b 100644 (file)
@@ -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;