Fix if there are no js files.
authorJan Schneider <jan@horde.org>
Mon, 22 Feb 2010 21:12:24 +0000 (22:12 +0100)
committerJan Schneider <jan@horde.org>
Mon, 22 Feb 2010 21:27:54 +0000 (22:27 +0100)
framework/Core/lib/Horde.php

index 60d1445..10ba230 100644 (file)
@@ -330,7 +330,6 @@ HTML;
         }
 
         $js_tocache = $js_force = $js_external = array();
-        $mtime = array(0);
 
         $s_list = $hsf->listFiles();
         if (empty($s_list)) {
@@ -388,6 +387,10 @@ HTML;
         }
 
         foreach (array_merge($js_force, array($js_tocache)) as $files) {
+            if (!count($files)) {
+                continue;
+            }
+
             $mtime = max($files['mtime']);
             unset($files['mtime']);