Welcome Guest, Not a member yet? Register   Sign In
loading my model to load_class
#8

(This post was last modified: 11-02-2017, 02:31 AM by Vitaly83.)

(11-01-2017, 05:05 AM)..Narf Wrote: Having eliminated CSRF and 404 errors from the set, recipients being in standard config, and knowing that extending/overriding CI_Exceptions won't work, you can use a pre_controller hook to do something like this:

With pre_controller hook custom error handlers aren't called. If I change hook to pre_system, they are called, but there is another error with Email library:
PHP Code:
    protected function _set_error_message($msg$val '')
    {
        $CI =& get_instance();
        $CI->lang->load('email');

        if (sscanf($msg'lang:%s'$line) !== OR FALSE === ($line $CI->lang->line($line)))
        {
            $this->_debug_msg[] = str_replace('%s'$val$msg).'<br />';
        }
        else
        
{
            $this->_debug_msg[] = str_replace('%s'$val$line).'<br />';
        }
    

And again, issue with getting CI instance.
This method is called from another Email method _spool_email.

As I understand the error is triggerred in CodeIgniter.php when the system calls load_class('Input', 'core') - before pre_controller hook (I think only pre_system hook can used for this purpose).
And then "Input constructor" -> "Security->csrf_verify" -> "Security->csrf_show_error" (error is cycled).
Reply


Messages In This Thread
loading my model to load_class - by Vitaly83 - 10-31-2017, 06:57 AM
RE: loading my model to load_class - by Narf - 10-31-2017, 09:18 AM
RE: loading my model to load_class - by Vitaly83 - 10-31-2017, 10:31 PM
RE: loading my model to load_class - by Narf - 11-01-2017, 05:05 AM
RE: loading my model to load_class - by Vitaly83 - 11-01-2017, 05:51 AM
RE: loading my model to load_class - by Vitaly83 - 11-02-2017, 02:30 AM
RE: loading my model to load_class - by Narf - 11-02-2017, 03:38 AM
RE: loading my model to load_class - by Vitaly83 - 11-02-2017, 04:12 AM
RE: loading my model to load_class - by Narf - 11-02-2017, 06:15 AM
RE: loading my model to load_class - by Vitaly83 - 11-02-2017, 07:30 AM



Theme © iAndrew 2016 - Forum software by © MyBB