Skip to content

Commit

Permalink
Fixed warnings in stack trace element when no stack args are set.
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Ploch committed Mar 9, 2012
1 parent 2c55c7c commit cc9b445
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/Cake/View/Elements/exception_stack_trace.ctp
Expand Up @@ -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'];

Expand Down

0 comments on commit cc9b445

Please sign in to comment.