mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Merge pull request #1669 from bcrowe/hotfix-instancecheck
Use instanceof instead of is_a() in Controller.php
This commit is contained in:
commit
af368132a5
1 changed files with 1 additions and 1 deletions
|
@ -940,7 +940,7 @@ class Controller extends Object implements CakeEventListener {
|
|||
$models = ClassRegistry::keys();
|
||||
foreach ($models as $currentModel) {
|
||||
$currentObject = ClassRegistry::getObject($currentModel);
|
||||
if (is_a($currentObject, 'Model')) {
|
||||
if ($currentObject instanceof Model) {
|
||||
$className = get_class($currentObject);
|
||||
list($plugin) = pluginSplit(App::location($className));
|
||||
$this->request->params['models'][$currentObject->alias] = compact('plugin', 'className');
|
||||
|
|
Loading…
Add table
Reference in a new issue