Fixed warnings in stack trace element when no stack args are set.

This commit is contained in:
Thomas Ploch 2012-03-09 17:50:03 +01:00
parent 2c55c7c193
commit cc9b445ece

View file

@ -41,10 +41,12 @@ App::uses('Debugger', 'Utility');
echo ' → ';
if ($stack['function']):
$args = array();
foreach ($stack['args'] as $arg):
$args[] = Debugger::getType($arg);
$params[] = Debugger::exportVar($arg, 2);
endforeach;
if (!empty($stack['args'])):
foreach ((array)$stack['args'] as $arg):
$args[] = Debugger::getType($arg);
$params[] = Debugger::exportVar($arg, 2);
endforeach;
endif;
$called = isset($stack['class']) ? $stack['class'] . $stack['type'] . $stack['function'] : $stack['function'];