From 253becaef526ea8e0d542f4b6659b854e39634f5 Mon Sep 17 00:00:00 2001 From: iJackUA Date: Tue, 15 Oct 2013 09:56:16 +0300 Subject: [PATCH] View default value for $params To prevent Warning "Trying to get property of non-object" in case when nothing set to params, but you try to get some key (check is there something) ArrayHelper::getValue($this->view->params, 'abc'); --- framework/yii/base/View.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/yii/base/View.php b/framework/yii/base/View.php index e3dcda8..483b611 100644 --- a/framework/yii/base/View.php +++ b/framework/yii/base/View.php @@ -96,7 +96,7 @@ class View extends Component /** * @var mixed custom parameters that are shared among view templates. */ - public $params; + public $params = array(); /** * @var array a list of available renderers indexed by their corresponding supported file extensions. * Each renderer may be a view renderer object or the configuration for creating the renderer object.