mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Adding condition inside Controller::render() to avoid storing in the request an empty model definition
This commit is contained in:
parent
4c8f5ce5be
commit
3594f7aa88
1 changed files with 1 additions and 1 deletions
|
@ -811,7 +811,7 @@ class Controller extends Object {
|
||||||
list($plugin, $className) = pluginSplit($model);
|
list($plugin, $className) = pluginSplit($model);
|
||||||
$this->request->params['models'][$model] = compact('plugin', 'className');
|
$this->request->params['models'][$model] = compact('plugin', 'className');
|
||||||
}
|
}
|
||||||
} if ($this->uses === false || $this->uses === array()) {
|
} if (!empty($this->modelClass) && ($this->uses === false || $this->uses === array())) {
|
||||||
$this->request->params['models'][$this->modelClass] = array('plugin' => $this->plugin, 'className' => $this->modelClass);
|
$this->request->params['models'][$this->modelClass] = array('plugin' => $this->plugin, 'className' => $this->modelClass);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue