Browse Source

Fixed Yii::importNamespaces() bug.

tags/2.0.0-beta
Qiang Xue 12 years ago
parent
commit
b68bd8ef63
  1. 4
      framework/YiiBase.php

4
framework/YiiBase.php

@ -158,8 +158,8 @@ class YiiBase
{ {
foreach ($namespaces as $name => $path) { foreach ($namespaces as $name => $path) {
if ($name !== '') { if ($name !== '') {
$name = '@' . str_replace('\\', '/', $name); $name = trim(strtr($name, array('\\' => '/', '_' => '/')), '/');
static::setAlias($name, $path); static::setAlias('@' . $name, rtrim($path, '/\\') . '/' . $name);
} }
} }
} }

Loading…
Cancel
Save