diff --git a/framework/base/Component.php b/framework/base/Component.php index 807da55..1b94ef1 100644 --- a/framework/base/Component.php +++ b/framework/base/Component.php @@ -311,9 +311,9 @@ class Component extends BaseObject if ($this->_behaviors !== null) { $behaviors = $this->_behaviors; - $this->_behaviors = null; + $this->_behaviors = []; foreach ($behaviors as $name => $behavior) { - $this->attachBehavior($name, clone $behavior); + $this->attachBehaviorInternal($name, clone $behavior); } } }