I’m migrating a Cake 1.3 App to an 2.X app. It is mostly working well but I don’t understand how I can rewrite this code for Cake 2.
public function initialize(&$controller) {
$this->Controller =& $controller;
}
The error warning is:
Cannot assign by reference to overloaded object
you really should read the migration guide at
http://book.cakephp.org/2.0/en/appendices/2-0-migration-guide.html
you can try to run my Upgrade shell. it should fix most of those itself:
https://github.com/dereuromark/upgrade
should do the trick
see https://github.com/dereuromark/upgrade/blob/master/Console/Command/CorrectShell.php#L733