Welcome Guest, Not a member yet? Register   Sign In
What is wrong with my usage of isset ?
#4

(This post was last modified: 09-14-2015, 08:36 AM by mwhitney.)

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)
{
    if (isset($_SESSION[$key])) 
    {
        return isset($_SESSION[$key]);
    
    elseif ($key === 'session_id'
    {
        return session_id() !== '';
    }

    return FALSE;

Reply


Messages In This Thread
RE: What is wrong with my usage of isset ? - by mwhitney - 09-14-2015, 08:35 AM



Theme © iAndrew 2016 - Forum software by © MyBB