Commit 599debc2 by Qiang Xue

Merge pull request #195 from suralc/trait-autoload

Check if trait was loaded
parents 8520be08 882a6116
...@@ -370,7 +370,8 @@ class YiiBase ...@@ -370,7 +370,8 @@ class YiiBase
include($classFile); 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; return true;
} else { } else {
throw new UnknownClassException("Unable to find '$className' in file: $classFile"); throw new UnknownClassException("Unable to find '$className' in file: $classFile");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment