mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-13 12:49:04 +08:00
Exception about missing class in class file only when YII_DEBUG
See discussion about exceptions in autoloader here: https://groups.google.com/forum/?fromgroups#!topic/php-fig/kRTVRSIJ0qE
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user