mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fixing multiple classes loading in App::import()
This commit is contained in:
parent
5a57f2c3c3
commit
ebd8d1d0c2
1 changed files with 4 additions and 2 deletions
|
@ -536,6 +536,7 @@ class App {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
$originalType = $type = strtolower($type);
|
||||
|
@ -563,8 +564,9 @@ class App {
|
|||
if ($plugin) {
|
||||
$plugin .= '.';
|
||||
}
|
||||
App::uses(Inflector::camelize($name), $plugin . $type);
|
||||
return (bool) self::load($name);
|
||||
$name = Inflector::camelize($name);
|
||||
App::uses($name, $plugin . $type);
|
||||
return class_exists($name);
|
||||
}
|
||||
|
||||
if ($type == 'file' && !empty($file)) {
|
||||
|
|
Loading…
Reference in a new issue