Browse Source

Merge pull request #147 from slavcodev/bug#146

Fix attaching behavior via config
tags/2.0.0-alpha
Qiang Xue 12 years ago
parent
commit
7f35028bfe
  1. 1
      framework/base/Component.php

1
framework/base/Component.php

@ -90,6 +90,7 @@ class Component extends Object
// as behavior: attach behavior // as behavior: attach behavior
$name = trim(substr($name, 3)); $name = trim(substr($name, 3));
$this->attachBehavior($name, $value instanceof Behavior ? $value : Yii::createObject($value)); $this->attachBehavior($name, $value instanceof Behavior ? $value : Yii::createObject($value));
return;
} else { } else {
// behavior property // behavior property
$this->ensureBehaviors(); $this->ensureBehaviors();

Loading…
Cancel
Save