Only variables should be assigned by reference using a function

I am using an old version of the Codeigniter framework. With the new php version, I get this error: Only variables should be assigned by reference

I am wondering if this is a safe fix: Change:

  $this->_base_classes =& is_loaded(); 

to

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

This is the same?

+6
source share
2 answers

Please view 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 should be:

 function &is_loaded($class = '') 
+10
source

remove this on line 150 from system/core/Loader.php

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

+1
source

Source: https://habr.com/ru/post/1014299/


All Articles