Browse Source

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
tags/2.0.0-beta
Carsten Brandt 11 years ago
parent
commit
8c753676db
  1. 2
      framework/yii/YiiBase.php

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

Loading…
Cancel
Save