From e56660836886fc01eef2a31e7d2fe2c81ba5847a Mon Sep 17 00:00:00 2001 From: anton Date: Sun, 30 Sep 2012 13:32:38 +0300 Subject: [PATCH] Fixed #1499 CVarDumper error in highlighting "\" --- CHANGELOG | 1 + framework/utils/CVarDumper.php | 11 ++++------- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 3be5c72f0d..698b007f30 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -24,6 +24,7 @@ Version 1.1.13 work in progress - Bug #1364: Empty CHtml::$errorCss cause class attribute rendering errors (creocoder) - Bug #1444: Fixed CGoogleApi::register call to registerScriptFile (mdomba) - Bug #1465: Fixed CHtml::beginForm() when CActiveForm with method GET and ajaxButton is used (mdomba) +- Bug #1499: Fixed CVarDumper highlighting "\" (antoncpu) - Bug #1485 CSort does not quote table alias when using CDbCriteria (undsoft) - Enh #104: Added CWebLogRoute::$collapsedInFireBug property to control whether the log should be collapsed by default in Firebug (marcovtwout) - Enh #84: Log route categories are now accepted in form of array. Added CLogRoute::except and parameter to CLogRoute::getLogs that allows you to exclude specific categories (paystey) diff --git a/framework/utils/CVarDumper.php b/framework/utils/CVarDumper.php index 8037b1c7af..2d0f6aa3ac 100644 --- a/framework/utils/CVarDumper.php +++ b/framework/utils/CVarDumper.php @@ -106,13 +106,10 @@ private static function dumpInternal($var,$level) self::$_output.="array\n".$spaces.'('; foreach($keys as $key) { - if(gettype($key)=='integer') - $key2=$key; - else - $key2="'".str_replace("'","\\'",$key)."'"; - - self::$_output.="\n".$spaces." $key2 => "; - self::$_output.=self::dumpInternal($var[$key],$level+1); + self::$_output.="\n".$spaces.' '; + self::dumpInternal($key,0); + self::$_output.=' => '; + self::dumpInternal($var[$key],$level+1); } self::$_output.="\n".$spaces.')'; }