From fc415b154c6035830374428cd8cd68d87ae7381f Mon Sep 17 00:00:00 2001 From: Qiang Xue Date: Tue, 9 Apr 2013 07:45:46 -0400 Subject: [PATCH] normalize class name. --- framework/YiiBase.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/framework/YiiBase.php b/framework/YiiBase.php index 606506b660..3e7a7f22a0 100644 --- a/framework/YiiBase.php +++ b/framework/YiiBase.php @@ -371,8 +371,10 @@ class YiiBase $class = static::import($class, true); } - if (isset(self::$objectConfig[ltrim($class, '\\')])) { - $config = array_merge(self::$objectConfig[ltrim($class, '\\')], $config); + $class = ltrim($class, '\\'); + + if (isset(self::$objectConfig[$class])) { + $config = array_merge(self::$objectConfig[$class], $config); } if (($n = func_num_args()) > 1) {