Commit 61352a44 by Alexander Makarov

Merge branch 'master'

parents 8583de70 6bcacec9
...@@ -539,16 +539,11 @@ abstract class Module extends Component ...@@ -539,16 +539,11 @@ abstract class Module extends Component
public function setComponents($components) public function setComponents($components)
{ {
foreach ($components as $id => $component) { foreach ($components as $id => $component) {
if (isset($this->_components[$id]) && !($this->_components[$id] instanceof Object)) {
if (isset($this->_components[$id]['class']) && !isset($component['class'])) { if (isset($this->_components[$id]['class']) && !isset($component['class'])) {
$component['class'] = $this->_components[$id]['class']; $component['class'] = $this->_components[$id]['class'];
} }
$this->_components[$id] = $component; $this->_components[$id] = $component;
} }
else {
throw new Exception('Cannot set component "'.$id.'" that is already instantiated.');
}
}
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment