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:
Carsten Brandt
2013-09-04 14:27:20 +02:00
parent df85be3622
commit 8c753676db

View File

@@ -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");
}