MINOR Variable checks in CMSMain->jsDeclaration()

This commit is contained in:
Ingo Schommer 2012-01-31 15:12:54 +01:00
parent 20085c46c3
commit 441d4452e3

View File

@ -318,7 +318,7 @@ JS;
return " {\n " . implode(", \n", $parts) . " }\n";
} else {
foreach($array as $part) $parts[] = $this->jsDeclaration($part);
return " [ " . implode(", ", $parts) . " ]\n";
return $parts ? " [ " . implode(", ", $parts) . " ]\n" : "[]\n";
}
} else {
return "'" . addslashes($array) . "'";