From 8c753676db71adaa62ad552cd0b0a8a8ba2ff125 Mon Sep 17 00:00:00 2001 From: Carsten Brandt Date: Wed, 4 Sep 2013 14:27:20 +0200 Subject: [PATCH] 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 --- framework/yii/YiiBase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"); }