From 3123c46826fa2ea8dc60dcfc6a896954c1208063 Mon Sep 17 00:00:00 2001 From: Qiang Xue Date: Fri, 12 Jul 2013 13:03:37 -0400 Subject: [PATCH] handle array in importNamespaces. --- framework/yii/YiiBase.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/framework/yii/YiiBase.php b/framework/yii/YiiBase.php index 6384023..5e003fc 100644 --- a/framework/yii/YiiBase.php +++ b/framework/yii/YiiBase.php @@ -156,6 +156,9 @@ class YiiBase foreach ($namespaces as $name => $path) { if ($name !== '') { $name = trim(strtr($name, array('\\' => '/', '_' => '/')), '/'); + if (is_array($path)) { + $path = reset($path); + } static::setAlias('@' . $name, rtrim($path, '/\\') . '/' . $name); } }