Search code examples
codeignitercodeigniter-2

Only variables should be assigned by reference with function


I use old version of Codeigniter framework. With new version of php I am gettings this error: Only variables should be assigned by reference

I am wondering if this is safe bugfix: Changing:

 $this->_base_classes =& is_loaded();

to

$assign = is_loaded();    
$this->_base_classes =& $assign;

Is that the same?


Solution

  • Please see this url

    https://github.com/bcit-ci/CodeIgniter/issues/904

    You can go to file: system/core/Loader.php Then file: system/core/Common.php Line 190 there should be:

    function &is_loaded($class = '')