mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fixing wrong class_exists check. Fixes #5474.
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7653 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
5245b3fa7c
commit
3459fef98f
1 changed files with 3 additions and 2 deletions
|
@ -133,8 +133,9 @@ class ClassRegistry {
|
|||
if (class_exists($class) || App::import($type, $plugin . $class)) {
|
||||
${$class} =& new $class($settings);
|
||||
} elseif ($type === 'Model') {
|
||||
if ($plugin && class_exists($plugin .'AppModel')) {
|
||||
$appModel = $plugin .'AppModel';
|
||||
$plugin = substr($plugin, 0, -1);
|
||||
if ($plugin && class_exists($plugin . 'AppModel')) {
|
||||
$appModel = $plugin . 'AppModel';
|
||||
} else {
|
||||
$appModel = 'AppModel';
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue