CodeIgniter Forums

Full Version: php 5.3 to 5.6 HELP!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi

A site I maintain written in CI has just been migrated by the server from php 5.3 to 5.6.

It's now got this error message at the top of the page -

A PHP Error was encountered
Severity: Notice
Message: Only variable references should be returned by reference
Filename: core/Common.php
Line Number: 243

The line in question is -

return $_config[0] =& $config;

as the last line of a function. A guy at the server suggested the error message meant php now could no longer find the array as it no longer understood it to be static.

Any tips for how to fix this, and any other issues re 5.3 to 5.6? Thanks!!!
Update your CI version as well, this issue is already fixed.
Thanks.

Turns out the whole problem was one line in Common.php which both assigned a value to an array and returned the array, all in one line. Assigned it in one line, returned in the next and the problem disappeared.

We're on ancient CI v 1.0. Is there a way to upgrade to 2.2.0 in one step, or do I have to go through all the intermediate upgrades?

Cheers