Welcome Guest, Not a member yet? Register   Sign In
get_instance return null
#3

Yes, I have it, and checked the chmod privileges

What I wanted to do is just load 2 lang files and use a template library

class MY_Exceptions extends CI_Exceptions
{
    public function show_404($page = '', $log_error = TRUE)
    {
        // By default we log this, but allow a dev to skip it
        if ($log_error)
        {
            log_message('error', '404 Page Not Found --> '.$page);
        }        
        
        $CI =& get_instance();        
        $CI->lang->load('error/index');        
        $CI->lang->load('pages/not_found');        

        $CI->template->title($CI->lang->line('title'))
                     ->meta('keywords', $CI->lang->line('keywords'))
                     ->meta('description', $CI->lang->line('description'))
                     ->make('errors/not_found');
        echo $CI->output->get_output();        
        exit;
    }
}

the var_dump($CI) outputs NULL

Sad

In CI2 worked perfectly.
Reply


Messages In This Thread
get_instance return null - by llobu - 11-25-2015, 07:48 AM
RE: get_instance return null - by InsiteFX - 11-25-2015, 09:26 AM
RE: get_instance return null - by llobu - 11-25-2015, 12:25 PM
RE: get_instance return null - by jvandemerwe - 11-25-2015, 02:38 PM
RE: get_instance return null - by Narf - 11-25-2015, 05:23 PM
RE: get_instance return null - by gastongr - 11-26-2015, 11:16 AM
RE: get_instance return null - by kenjis - 11-26-2015, 02:12 PM
RE: get_instance return null - by sv3tli0 - 11-27-2015, 02:06 AM
RE: get_instance return null - by gastongr - 11-27-2015, 09:58 AM
RE: get_instance return null - by kenjis - 11-27-2015, 03:26 PM



Theme © iAndrew 2016 - Forum software by © MyBB