Commit 293b1737 by Carsten Brandt

cleanup YiiBase::autoload()

parent b96fd24e
...@@ -353,11 +353,10 @@ class YiiBase ...@@ -353,11 +353,10 @@ class YiiBase
$path = str_replace('_', '/', $className) . '.php'; $path = str_replace('_', '/', $className) . '.php';
} }
// try via path alias first // try loading via path alias
if (strpos($path, '/') !== false) { if (strpos($path, '/') !== false) {
$fullPath = static::getAlias('@' . $path, false); $classFile = static::getAlias('@' . $path, false);
if ($fullPath !== false && is_file($fullPath)) { if ($classFile !== false && is_file($classFile)) {
$classFile = $fullPath;
include($classFile); include($classFile);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment