Fix to resolve 'assign by reference' errors when using a '__get' magic method.

Fixes #1476

Signed-off-by: mark_story <mark@mark-story.com>
This commit is contained in:
Joe Beeson 2011-01-21 13:23:29 -07:00 committed by mark_story
parent ed7f8d1906
commit e58e3f3132

View file

@ -246,7 +246,11 @@ class Component extends Object {
if ($componentCn === 'SessionComponent') {
$object->{$component} =& new $componentCn($base);
} else {
$object->{$component} =& new $componentCn();
if (PHP5) {
$object->{$component} = new $componentCn();
} else {
$object->{$component} =& new $componentCn();
}
}
$object->{$component}->enabled = true;
$this->_loaded[$component] =& $object->{$component};