mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
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:
parent
0ff44a2ab7
commit
d341f531d3
1 changed files with 8 additions and 5 deletions
|
@ -367,11 +367,14 @@ class Debugger extends Object {
|
||||||
$out = "array(";
|
$out = "array(";
|
||||||
$vars = array();
|
$vars = array();
|
||||||
foreach ($var as $key => $val) {
|
foreach ($var as $key => $val) {
|
||||||
if (is_numeric($key)) {
|
if ($recursion >= 0) {
|
||||||
$vars[] = "\n\t" . $_this->exportVar($val, $recursion - 1);
|
if (is_numeric($key)) {
|
||||||
} else {
|
$vars[] = "\n\t" . $_this->exportVar($val, $recursion - 1);
|
||||||
$vars[] = "\n\t" .$_this->exportVar($key) . ' => ' . $_this->exportVar($val, $recursion - 1);
|
} else {
|
||||||
}
|
$vars[] = "\n\t" .$_this->exportVar($key, $recursion - 1)
|
||||||
|
. ' => ' . $_this->exportVar($val, $recursion - 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$n = null;
|
$n = null;
|
||||||
if (count($vars) > 0) {
|
if (count($vars) > 0) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue