Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Adding condition inside Controller::render() to avoid storing in the …

…request an empty model definition
  • Loading branch information...
commit 3594f7aa882cda97912237fee3710754e204ff8d 1 parent 4c8f5ce
@lorenzo lorenzo authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/Cake/Controller/Controller.php
View
2  lib/Cake/Controller/Controller.php
@@ -811,7 +811,7 @@ public function render($view = null, $layout = null) {
list($plugin, $className) = pluginSplit($model);
$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);
}
Please sign in to comment.
Something went wrong with that request. Please try again.