Skip to content
Snippets Groups Projects
Commit 5c97ad3a authored by Marius van Witzenburg's avatar Marius van Witzenburg
Browse files

Fixed undefined errors

parent 1fab701c
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment