LSdebug() : Added LSlog() call

This commit is contained in:
Benjamin Renard 2011-04-22 14:32:44 +02:00
parent 1b8d363ccc
commit 938d672f65

View file

@ -219,16 +219,13 @@ function varDump($data) {
$GLOBALS['LSdebug_fields']=array();
function LSdebug($data,$dump=false) {
if ($dump) {
$GLOBALS['LSdebug_fields'][]=varDump($data);
$data=varDump($data);
}
else if (!is_array($data) && !is_object($data)) {
$data="[$data]";
}
else {
if (is_array($data)||is_object($data)) {
$GLOBALS['LSdebug_fields'][]=$data;
}
else {
$GLOBALS['LSdebug_fields'][]="[$data]";
}
}
LSlog('[DEBUG] '.$data);
return true;
}