CodeIgniter Error: variable references CodeIgniter Error: variable references codeigniter codeigniter

CodeIgniter Error: variable references


Try this one:

Change it in your Common.php

if (count($replace) > 0){    foreach ($replace as $key => $val){        if (isset($config[$key])){            $config[$key] = $val;        }    }}$_config[0] =& $config;return $_config[0];

See also here , for more reference : Only variable references should be returned by reference - Codeigniter . I hope this helps.


In Common.php Change this

return $_config[0] =& $config;

to this

$_config[0] =& $config;return $_config[0];

Problem is with assigning and returning data.


If your code is still not working, then try this.

$_config[1]=& $config;return $_config[0];