mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-08 12:32:42 +00:00
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:
parent
ed7f8d1906
commit
e58e3f3132
1 changed files with 5 additions and 1 deletions
|
@ -246,7 +246,11 @@ class Component extends Object {
|
||||||
if ($componentCn === 'SessionComponent') {
|
if ($componentCn === 'SessionComponent') {
|
||||||
$object->{$component} =& new $componentCn($base);
|
$object->{$component} =& new $componentCn($base);
|
||||||
} else {
|
} else {
|
||||||
$object->{$component} =& new $componentCn();
|
if (PHP5) {
|
||||||
|
$object->{$component} = new $componentCn();
|
||||||
|
} else {
|
||||||
|
$object->{$component} =& new $componentCn();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$object->{$component}->enabled = true;
|
$object->{$component}->enabled = true;
|
||||||
$this->_loaded[$component] =& $object->{$component};
|
$this->_loaded[$component] =& $object->{$component};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue