Welcome Guest, Not a member yet? Register   Sign In
Enabling Hooks Breaks Autoloading?
#1

[eluser]Unknown[/eluser]
I'm using CI 2 and need to enable a pre_controller hook. Whenever I set enable_hooks = true in config any libraries I was autoloading now give errors. For example, I have the database library in my autoloader and get an error from the Model class saying $db is invalid. When I set enable_hooks to false it goes away. The pre_controller hook does run when enabled and before the error is generated. Anyone have any experience with this?

Thanks!




Theme © iAndrew 2016 - Forum software by © MyBB