Fix error handling for functions without arguments

This commit is contained in:
Aaron van Geffen 2023-03-15 09:49:55 +01:00
parent d1741f2478
commit b2bcb6a124

View File

@ -96,6 +96,8 @@ class ErrorHandler
$object = isset($call['class']) ? $call['class'] . $call['type'] : ''; $object = isset($call['class']) ? $call['class'] . $call['type'] : '';
$args = []; $args = [];
if (isset($call['args']))
{
foreach ($call['args'] as $j => $arg) foreach ($call['args'] as $j => $arg)
{ {
if (is_array($arg)) if (is_array($arg))
@ -103,6 +105,7 @@ class ErrorHandler
elseif (is_object($arg)) elseif (is_object($arg))
$args[$j] = var_dump($arg); $args[$j] = var_dump($arg);
} }
}
$buffer .= '#' . str_pad($i, 3, ' ') $buffer .= '#' . str_pad($i, 3, ' ')
. $object . $call['function'] . '(' . implode(', ', $args) . ')' . $object . $call['function'] . '(' . implode(', ', $args) . ')'