Changeset 2919

Show
Ignore:
Timestamp:
06/26/2008 11:50:43 AM (5 months ago)
Author:
Shadowhand
Message:

Minor fix to Session: When Session::regenerate is called, the $_COOKIE value is immediately updated

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/system/libraries/Session.php

    r2899 r2919  
    240240                        $_SESSION['session_id'] = self::$driver->regenerate(); 
    241241                } 
     242 
     243                // Get the session name 
     244                $name = session_name(); 
     245 
     246                if (isset($_COOKIE[$name])) 
     247                { 
     248                        // Change the cookie value to match the new session id to remove the "lag time" 
     249                        $_COOKIE[$name] = $_SESSION['session_id']; 
     250                } 
    242251        } 
    243252