Fixes issue #294.

This commit is contained in:
Qiang Xue
2013-05-16 07:25:55 -04:00
parent 0005b07d29
commit 986bfccd34
2 changed files with 8 additions and 1 deletions

View File

@@ -287,7 +287,11 @@ class YiiBase
if ($path !== null) {
$path = strncmp($path, '@', 1) ? rtrim($path, '\\/') : static::getAlias($path);
if (!isset(self::$aliases[$root])) {
self::$aliases[$root] = $path;
if ($pos === false) {
self::$aliases[$root] = $path;
} else {
self::$aliases[$root] = array($alias => $path);
}
} elseif (is_string(self::$aliases[$root])) {
if ($pos === false) {
self::$aliases[$root] = $path;