mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Making sure the default model for controller is added to the request models parameter in render()
This commit is contained in:
parent
37231b4ce6
commit
b16a5f24db
1 changed files with 2 additions and 0 deletions
|
@ -811,6 +811,8 @@ class Controller extends Object {
|
|||
list($plugin, $className) = pluginSplit($model);
|
||||
$this->request->params['models'][$model] = compact('plugin', 'className');
|
||||
}
|
||||
} if ($this->uses === false || $this->uses === array()) {
|
||||
$this->request->params['models'][$this->modelClass] = array('plugin' => $this->plugin, 'className' => $this->modelClass);
|
||||
}
|
||||
|
||||
$models = ClassRegistry::keys();
|
||||
|
|
Loading…
Reference in a new issue