mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-18 00:09:06 +01:00
functions : Added varDump function and use it in LSdebug function
This commit is contained in:
parent
9ddb6c17e2
commit
791e20be74
1 changed files with 9 additions and 4 deletions
|
@ -208,13 +208,18 @@ function return_data($data) {
|
|||
return $data;
|
||||
}
|
||||
|
||||
function varDump($data) {
|
||||
ob_start();
|
||||
var_dump($data);
|
||||
$data=ob_get_contents();
|
||||
ob_end_clean();
|
||||
return $data;
|
||||
}
|
||||
|
||||
$GLOBALS['LSdebug_fields']=array();
|
||||
function LSdebug($data,$dump=false) {
|
||||
if ($dump) {
|
||||
ob_start();
|
||||
var_dump($data);
|
||||
$GLOBALS['LSdebug_fields'][]=ob_get_contents();
|
||||
ob_end_clean();
|
||||
$GLOBALS['LSdebug_fields'][]=varDump($data);
|
||||
}
|
||||
else {
|
||||
if (is_array($data)||is_object($data)) {
|
||||
|
|
Loading…
Reference in a new issue