Adding a backwards compatible check to ClassRegistry::init() so it is still able to return classes that are not instance of Model

This commit is contained in:
Jose Lorenzo Rodriguez 2011-07-24 14:02:16 -04:30
parent d63dde0fde
commit 31efa022df

View file

@ -137,7 +137,9 @@ class ClassRegistry {
if (class_exists($class)) {
${$class} = new $class($settings);
${$class} = (${$class} instanceof Model) ? ${$class} : null;
if ($strict) {
${$class} = (${$class} instanceof Model) ? ${$class} : null;
}
}
if (!isset(${$class})) {
if ($strict) {