Welcome Guest, Not a member yet? Register   Sign In
Undefined Property rather than 404 page
#1

[eluser]Kyle Ellman[/eluser]
Hello.

Here is my issue.

I have a 404 override (in routes) to a controller called Profile. Profile will check if the url has a username of a user and if it does, displays a profile. Otherwise it displays a 404 page. That way I can have any normal controllers, but if the first url segment isn't a controller, then Profile is called to show either the profile or the 40 page.

If I type a random url in, the 404 page shows. But if I type in a controller, then a nonexistent function, I get this error:

Undefined property: Profile::$session

The session library is called in my base_controller (like my_controller) constructor, and is alutoloaded. It is loaded and works everywhere else, so I know the autoloading nor the base_controller is the issue.

Any ideas?

Thanks.




Theme © iAndrew 2016 - Forum software by © MyBB