CodeIgniter Forums
ci_bep2 - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: ci_bep2 (/showthread.php?tid=28390)



ci_bep2 - El Forum - 03-10-2010

[eluser]Unknown[/eluser]
Hello. I've download CodeIgniter Shopping Cart v1.1 form http://www.box.net/shared/8d1pc59itv and i've some errors.

A PHP Error was encountered
Severity: 8192
Message: Assigning the return value of new by reference is deprecated
Filename: libraries/Loader.php
Line Number: 414

and some errors with headers (headers already send at Loader.php:414).

this is function:
Code:
function dbutil()
    {
        if ( ! class_exists('CI_DB'))
        {
            $this->database();
        }

        $CI =& get_instance();

        // for backwards compatibility, load dbforge so we can extend dbutils off it
        // this use is deprecated and strongly discouraged
        $CI->load->dbforge();

        require_once(BASEPATH.'database/DB_utility'.EXT);
        require_once(BASEPATH.'database/drivers/'.$CI->db->dbdriver.'/'.$CI->db->dbdriver.'_utility'.EXT);
        $class = 'CI_DB_'.$CI->db->dbdriver.'_utility';

        $CI->dbutil =& new $class();

        $CI->load->_ci_assign_to_models();
    }
and line 414 is $CI->dbutil =& new $class();

How can i fix this?


ci_bep2 - El Forum - 03-10-2010

[eluser]Kamarg[/eluser]
Code:
$CI->dbutil = new $class();