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)
|
foreach ($call['args'] as $j => $arg)
|
||||||
{
|
{
|
||||||
if (is_array($arg))
|
// Only include the class name for objects
|
||||||
$args[$j] = print_r($arg, true);
|
if (is_object($arg))
|
||||||
elseif (is_object($arg))
|
$args[$j] = get_class($arg) . '{}';
|
||||||
$args[$j] = var_dump($arg);
|
// Export everything else -- including arrays
|
||||||
|
else
|
||||||
|
$args[$j] = var_export($arg, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user