Welcome Guest, Not a member yet? Register   Sign In
Error on $ci =& get_instance();
#6

[eluser]xwero[/eluser]
the ci instance doesn't exist pre controller, this is because the controller is the CI instance. so your helper isn't loaded either.

load your files as late as possible. autloading language files is the option you should consider if there is no other possibility because then the files are loaded in each controller of your application.
If you load language files in the constructor this means all methods use them. You can extend the language class to fetch the files that already are loaded, clean the internal storage and load them again with the language you just set in the hook function. So you call the method in the extended language class in your hook function.
If you load the language files in your controller methods everything should work.


Messages In This Thread
Error on $ci =& get_instance(); - by El Forum - 03-14-2009, 07:59 AM
Error on $ci =& get_instance(); - by El Forum - 03-14-2009, 08:18 AM
Error on $ci =& get_instance(); - by El Forum - 03-14-2009, 08:47 AM
Error on $ci =& get_instance(); - by El Forum - 03-14-2009, 08:55 AM
Error on $ci =& get_instance(); - by El Forum - 03-14-2009, 10:13 AM
Error on $ci =& get_instance(); - by El Forum - 03-14-2009, 11:41 AM
Error on $ci =& get_instance(); - by El Forum - 03-14-2009, 08:19 PM



Theme © iAndrew 2016 - Forum software by © MyBB