From e8b674dc783d63ec7c8960ee0828ecba3c2248a2 Mon Sep 17 00:00:00 2001 From: Carsten Brandt Date: Sun, 5 Jan 2014 01:11:33 +0100 Subject: [PATCH] Do not unset class properties! this will result in objects that do not have the property anymore :-) --- framework/yii/rbac/Item.php | 2 +- framework/yii/web/View.php | 14 ++++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/framework/yii/rbac/Item.php b/framework/yii/rbac/Item.php index ae9214e..2e1eb53 100644 --- a/framework/yii/rbac/Item.php +++ b/framework/yii/rbac/Item.php @@ -199,6 +199,6 @@ class Item extends Object public function save() { $this->manager->saveItem($this, $this->_oldName); - unset($this->_oldName); + $this->_oldName = null; } } diff --git a/framework/yii/web/View.php b/framework/yii/web/View.php index 6960f19..65addcf 100644 --- a/framework/yii/web/View.php +++ b/framework/yii/web/View.php @@ -163,14 +163,12 @@ class View extends \yii\base\View self::PH_BODY_END => $this->renderBodyEndHtml(), ]); - unset( - $this->metaTags, - $this->linkTags, - $this->css, - $this->cssFiles, - $this->js, - $this->jsFiles - ); + $this->metaTags = null; + $this->linkTags = null; + $this->css = null; + $this->cssFiles = null; + $this->js = null; + $this->jsFiles = null; } /**