What is wrong with my usage of isset ? |
Code: //if (isset($this->session->account_level)) I don't really need the if statement anyway, but if I use it the result is always false.
If I comment out the if statement like I did the variable $accesslevel is set to a value, so it must exist. Maybe it's thought of as being a property rather than a variable and perhaps isset doesn't work with properties. Just a guess.
If I'm reading PHP's documentation correctly, the Session library would have to define __isset() for this to work properly. It might also be worthwhile to define __unset().
__isset() might look something like this (based on the current definition of __get()): PHP Code: public function __isset($key) |
Welcome Guest, Not a member yet? Register Sign In |