diff --git a/cake/libs/debugger.php b/cake/libs/debugger.php index 1ef6571a3..817070a3d 100644 --- a/cake/libs/debugger.php +++ b/cake/libs/debugger.php @@ -367,11 +367,14 @@ class Debugger extends Object { $out = "array("; $vars = array(); foreach ($var as $key => $val) { - if (is_numeric($key)) { - $vars[] = "\n\t" . $_this->exportVar($val, $recursion - 1); - } else { - $vars[] = "\n\t" .$_this->exportVar($key) . ' => ' . $_this->exportVar($val, $recursion - 1); - } + if ($recursion >= 0) { + if (is_numeric($key)) { + $vars[] = "\n\t" . $_this->exportVar($val, $recursion - 1); + } else { + $vars[] = "\n\t" .$_this->exportVar($key, $recursion - 1) + . ' => ' . $_this->exportVar($val, $recursion - 1); + } + } } $n = null; if (count($vars) > 0) {