diff --git a/lib/Cake/Utility/ClassRegistry.php b/lib/Cake/Utility/ClassRegistry.php index b30dff006..8a29d03df 100644 --- a/lib/Cake/Utility/ClassRegistry.php +++ b/lib/Cake/Utility/ClassRegistry.php @@ -181,15 +181,9 @@ class ClassRegistry { } elseif ($plugin && class_exists($plugin . 'AppModel')) { $appModel = $plugin . 'AppModel'; } - if (!empty($appModel)) { - $settings['name'] = $class; - $instance = new $appModel($settings); - } - if (!isset($instance)) { - trigger_error(__d('cake_dev', '(ClassRegistry::init() could not create instance of %s', $class), E_USER_WARNING); - return false; - } + $settings['name'] = $class; + $instance = new $appModel($settings); } $_this->map($alias, $class); }