mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-03-01 07:09:46 +00:00
Removed the code that was never being executed
This commit is contained in:
parent
5263edde8b
commit
ba0901d40e
1 changed files with 2 additions and 8 deletions
|
@ -181,15 +181,9 @@ class ClassRegistry {
|
||||||
} elseif ($plugin && class_exists($plugin . 'AppModel')) {
|
} elseif ($plugin && class_exists($plugin . 'AppModel')) {
|
||||||
$appModel = $plugin . 'AppModel';
|
$appModel = $plugin . 'AppModel';
|
||||||
}
|
}
|
||||||
if (!empty($appModel)) {
|
|
||||||
$settings['name'] = $class;
|
|
||||||
$instance = new $appModel($settings);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isset($instance)) {
|
$settings['name'] = $class;
|
||||||
trigger_error(__d('cake_dev', '(ClassRegistry::init() could not create instance of %s', $class), E_USER_WARNING);
|
$instance = new $appModel($settings);
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
$_this->map($alias, $class);
|
$_this->map($alias, $class);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue