Fixing recursion in Debugger variable dumps

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6719 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
nate 2008-04-26 11:10:55 +00:00
parent 0ff44a2ab7
commit d341f531d3

View file

@ -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) {