From 3594f7aa882cda97912237fee3710754e204ff8d Mon Sep 17 00:00:00 2001 From: Jose Lorenzo Rodriguez Date: Sun, 17 Jul 2011 22:54:11 -0430 Subject: [PATCH] Adding condition inside Controller::render() to avoid storing in the request an empty model definition --- lib/Cake/Controller/Controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Cake/Controller/Controller.php b/lib/Cake/Controller/Controller.php index fc22e791b4a..b89fd26086a 100644 --- a/lib/Cake/Controller/Controller.php +++ b/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); }