Browse Source

Merge pull request #195 from suralc/trait-autoload

Check if trait was loaded
tags/2.0.0-beta
Qiang Xue 12 years ago
parent
commit
599debc2b9
  1. 3
      framework/YiiBase.php

3
framework/YiiBase.php

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

Loading…
Cancel
Save