From 293b1737e11740783e228f39017eb2c12ae06f46 Mon Sep 17 00:00:00 2001 From: Carsten Brandt Date: Mon, 12 Aug 2013 02:36:47 +0200 Subject: [PATCH] cleanup YiiBase::autoload() --- framework/yii/YiiBase.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/framework/yii/YiiBase.php b/framework/yii/YiiBase.php index 2f2bf61..2834d7e 100644 --- a/framework/yii/YiiBase.php +++ b/framework/yii/YiiBase.php @@ -353,11 +353,10 @@ class YiiBase $path = str_replace('_', '/', $className) . '.php'; } - // try via path alias first + // try loading via path alias if (strpos($path, '/') !== false) { - $fullPath = static::getAlias('@' . $path, false); - if ($fullPath !== false && is_file($fullPath)) { - $classFile = $fullPath; + $classFile = static::getAlias('@' . $path, false); + if ($classFile !== false && is_file($classFile)) { include($classFile); } }