forked from Public/pics
ErrorHandling: improve argument handling for debug info
`var_dump` was the wrong function to call for objects, as it would just output all object data to the output buffer... Let's generalise and use `var_export` instead :-)
This commit is contained in:
parent
6c5d814a99
commit
2a528f2830
@ -100,10 +100,12 @@ class ErrorHandler
|
||||
{
|
||||
foreach ($call['args'] as $j => $arg)
|
||||
{
|
||||
if (is_array($arg))
|
||||
$args[$j] = print_r($arg, true);
|
||||
elseif (is_object($arg))
|
||||
$args[$j] = var_dump($arg);
|
||||
// Only include the class name for objects
|
||||
if (is_object($arg))
|
||||
$args[$j] = get_class($arg) . '{}';
|
||||
// Export everything else -- including arrays
|
||||
else
|
||||
$args[$j] = var_export($arg, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user