Browse Source

Updated file bundler, bugfix for Steffen

markseu 6 years ago
parent
commit
1e11e5642f
1 changed files with 6 additions and 4 deletions
  1. 6 4
      system/plugins/bundle.php

+ 6 - 4
system/plugins/bundle.php

@@ -4,7 +4,7 @@
 // This file may be used and distributed under the terms of the public license.
 // This file may be used and distributed under the terms of the public license.
 
 
 class YellowBundle {
 class YellowBundle {
-    const VERSION = "0.7.2";
+    const VERSION = "0.7.3";
     public $yellow;         //access to API
     public $yellow;         //access to API
 
 
     // Handle initialisation
     // Handle initialisation
@@ -89,10 +89,12 @@ class YellowBundle {
             $location = substru($key, strlenu($base));
             $location = substru($key, strlenu($base));
             $fileName = $this->yellow->lookup->findFileFromSystem($location);
             $fileName = $this->yellow->lookup->findFileFromSystem($location);
             $modified = max($modified, $this->yellow->toolbox->getFileModified($fileName));
             $modified = max($modified, $this->yellow->toolbox->getFileModified($fileName));
-            if (is_readable($fileName)) array_push($fileNames, $fileName);
-            unset($data[$key]);
+            if (is_readable($fileName)) {
+                array_push($fileNames, $fileName);
+                unset($data[$key]);
+            }
         }
         }
-        if (count($fileNames)>1) {
+        if (!empty($fileNames)) {
             $this->yellow->toolbox->timerStart($time);
             $this->yellow->toolbox->timerStart($time);
             $id = substru(md5(implode($fileNames).$base), 0, 10);
             $id = substru(md5(implode($fileNames).$base), 0, 10);
             $fileNameBundle = $this->yellow->config->get("assetDir")."bundle-$id.min.$type";;
             $fileNameBundle = $this->yellow->config->get("assetDir")."bundle-$id.min.$type";;