From 3d40b171e077e051db6e277afe5634d149095716 Mon Sep 17 00:00:00 2001 From: slavcopost Date: Mon, 6 May 2013 23:27:11 +0300 Subject: [PATCH 1/2] Fix attaching behavior via config --- framework/base/Component.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/framework/base/Component.php b/framework/base/Component.php index 582cf03..e2520d1 100644 --- a/framework/base/Component.php +++ b/framework/base/Component.php @@ -8,6 +8,7 @@ namespace yii\base; use Yii; +use yii\helpers\base\VarDumper; /** * @include @yii/base/Component.md @@ -90,6 +91,7 @@ class Component extends Object // as behavior: attach behavior $name = trim(substr($name, 3)); $this->attachBehavior($name, $value instanceof Behavior ? $value : Yii::createObject($value)); + return; } else { // behavior property $this->ensureBehaviors(); From a94c43231165e101e2c7273a8d4e459bbf737675 Mon Sep 17 00:00:00 2001 From: slavcopost Date: Mon, 6 May 2013 23:40:32 +0300 Subject: [PATCH 2/2] Fix attaching behavior via config --- framework/base/Component.php | 1 - 1 file changed, 1 deletion(-) diff --git a/framework/base/Component.php b/framework/base/Component.php index e2520d1..8e75835 100644 --- a/framework/base/Component.php +++ b/framework/base/Component.php @@ -8,7 +8,6 @@ namespace yii\base; use Yii; -use yii\helpers\base\VarDumper; /** * @include @yii/base/Component.md