From 5c97ad3aac41a6dd244317211866ce1f053e0176 Mon Sep 17 00:00:00 2001
From: Marius van Witzenburg <info@mariusvw.com>
Date: Tue, 8 Sep 2015 09:41:01 +0200
Subject: [PATCH] Fixed undefined errors

---
 lib/exe/js.php | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/exe/js.php b/lib/exe/js.php
index 16d22daf2..7a956b7c9 100644
--- a/lib/exe/js.php
+++ b/lib/exe/js.php
@@ -173,7 +173,7 @@ function js_load($file){
         // is it a include_once?
         if($match[1]){
             $base = utf8_basename($ifile);
-            if($loaded[$base]){
+            if(array_key_exists($base, $loaded) && $loaded[$base] === true){
                 $data  = str_replace($match[0], '' ,$data);
                 continue;
             }
@@ -419,9 +419,9 @@ function js_compress($s){
 
             // Only consider deleting whitespace if the signs before and after
             // are not equal and are not an operator which may not follow itself.
-            if ((!$lch || $s[$i+1] == ' ')
+            if (isset($s[$i+1]) && ((!$lch || $s[$i+1] == ' ')
                 || $lch != $s[$i+1]
-                || strpos($ops,$s[$i+1]) === false) {
+                || strpos($ops,$s[$i+1]) === false)) {
                 // leading spaces
                 if($i+1 < $slen && (strpos($chars,$s[$i+1]) !== false)){
                     $i = $i + 1;
-- 
GitLab