Skip to content

Commit

Permalink
Adding condition inside Controller::render() to avoid storing in the …
Browse files Browse the repository at this point in the history
…request an empty model definition
  • Loading branch information
lorenzo committed Jul 18, 2011
1 parent 4c8f5ce commit 3594f7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Cake/Controller/Controller.php
Expand Up @@ -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);
}

Expand Down

0 comments on commit 3594f7a

Please sign in to comment.