Skip to content

Commit b29cc6a

Browse files
committed
Try again at fixing errors in 5.2
1 parent c94a684 commit b29cc6a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/Cake/Utility/Debugger.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -542,10 +542,11 @@ protected static function _array(array $var, $depth, $indent) {
542542

543543
if ($depth >= 0) {
544544
foreach ($var as $key => $val) {
545-
if ($val != $var) {
546-
$val = self::_export($val, $depth, $indent);
547-
} else {
545+
// Sniff for globals as !== explodes in < 5.4
546+
if ($key === 'GLOBALS' && is_array($val) && isset($val['GLOBALS'])) {
548547
$val = '[recursion]';
548+
} else if ($val !== $var) {
549+
$val = self::_export($val, $depth, $indent);
549550
}
550551
$vars[] = $break . self::exportVar($key) .
551552
' => ' .

0 commit comments

Comments
 (0)