diff --git a/framework/YiiBase.php b/framework/YiiBase.php index faf8a6e..1a3f50c 100644 --- a/framework/YiiBase.php +++ b/framework/YiiBase.php @@ -370,7 +370,8 @@ class YiiBase include($classFile); - if (class_exists($className, false) || interface_exists($className, false)) { + if (class_exists($className, false) || interface_exists($className, false) || + function_exists('trait_exists') && trait_exists($className, false)) { return true; } else { throw new UnknownClassException("Unable to find '$className' in file: $classFile");