Only variables should be assigned by reference
This error isn't PHP 7-exclusive, you'd get it in older versions too. Anyway, I think the issue here is in is_loaded()
and it is not returning a reference properly. Does it return by-reference (is it like function &is_loaded()
)? If not, it needs to. Does it return a variable or an expression? If it's not a variable, you need to put it in one before you can return a reference to it.
PHP manual page for this error: http://php.net/manual/en/language.references.return.php
Methods with the same name as their class will not be constructors in a future version of PHP; CI_DB_driver has a deprecated constructor
In PHP 4, you made a constructor method by naming it the same as the class. So if your class was class FooBar
, your constructor would be public function FooBar
. In PHP 5 and beyond, though, the recommended name for a constructor is __construct
. So, go and edit that class and rename its constructor to get rid of the deprecation errors. Be sure to look at any extending classes to see if they call that constructor method, too, so you can change them.
See the upgrading guide: http://php.net/manual/en/migration70.deprecated.php
Also see the RFC: https://wiki.php.net/rfc/remove_php4_constructors