Skip to content

Commit 08b28f5

Browse files
committed
correctly handled objects byt encoding and decoding
* fixeds lonnieezell#9 in correct way
1 parent 38b4f50 commit 08b28f5

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

libraries/Profiler.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -549,16 +549,19 @@ function _compile_userdata()
549549
{
550550
if (is_numeric($key))
551551
{
552-
$output[$key] = "'$val'";
552+
$output[$key] = print_r($val,true);
553553
}
554554

555555
if (is_array($val) || is_object($val))
556556
{
557-
$output[$key] = htmlspecialchars(stripslashes(print_r($val, true)));
557+
if (is_object($val))
558+
$output[$key] = json_decode(json_encode($val), true);
559+
else
560+
$output[$key] = htmlspecialchars(stripslashes(print_r($val, true)));
558561
}
559562
else
560563
{
561-
$output[$key] = htmlspecialchars(stripslashes($val));
564+
$output[$key] = htmlspecialchars(stripslashes(print_r($val, true)));
562565
}
563566
}
564567
}

0 commit comments

Comments
 (0)