diff --git a/framework/yii/YiiBase.php b/framework/yii/YiiBase.php index c96a969..f04903d 100644 --- a/framework/yii/YiiBase.php +++ b/framework/yii/YiiBase.php @@ -335,7 +335,7 @@ class YiiBase include($classFile); - if (!class_exists($className, false) && !interface_exists($className, false) && + if (YII_DEBUG && !class_exists($className, false) && !interface_exists($className, false) && (!function_exists('trait_exists') || !trait_exists($className, false))) { throw new UnknownClassException("Unable to find '$className' in file: $classFile"); }