CodeIgniter Forums
Fatal error: Allowed memory size - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Fatal error: Allowed memory size (/showthread.php?tid=13209)



Fatal error: Allowed memory size - El Forum - 11-14-2008

[eluser]Kurtis[/eluser]
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 35 bytes) in /system/libraries/Model.php on line 60

Code:
function _assign_libraries($use_reference = TRUE)
    {
        $CI =& get_instance();                
line 60:    foreach (array_keys(get_object_vars($CI)) as $key)
        {
            if ( ! isset($this->$key) AND $key != $this->_parent_name)
            {            
                // In some cases using references can cause
                // problems so we'll conditionally use them
                if ($use_reference == TRUE)
                {
                    // Needed to prevent reference errors with some configurations
                    $this->$key = '';
                    $this->$key =& $CI->$key;
                }
                else
                {
                    $this->$key = $CI->$key;
                }
            }
        }        
    }