Possible fix for messed up file order on linux
authorAlexander Ebert <ebert@woltlab.com>
Wed, 2 Mar 2016 17:09:50 +0000 (18:09 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Wed, 2 Mar 2016 17:09:50 +0000 (18:09 +0100)
Fixes #1981

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

index 4c7723849aa7f3173e6cef42c11305552b693168..b019aaf12d61a146a94a22a5dfe5509690941bdc 100644 (file)
@@ -89,7 +89,11 @@ class StyleCompiler extends SingletonFactory {
                        }
                        
                        closedir($handle);
+                       
+                       // directory order is not deterministic in some cases
+                       sort($files);
                }
+               
                // TESTING ONLY
                
                while ($row = $statement->fetchArray()) {
@@ -176,6 +180,9 @@ class StyleCompiler extends SingletonFactory {
                        }
                        
                        closedir($handle);
+                       
+                       // directory order is not deterministic in some cases
+                       sort($files);
                }
                
                $additional = ['layout'];