added a check for a null value when adding session values
authorJason Richey <jasonr@users.mediawiki.org>
Wed, 15 Oct 2008 22:12:46 +0000 (22:12 +0000)
committerJason Richey <jasonr@users.mediawiki.org>
Wed, 15 Oct 2008 22:12:46 +0000 (22:12 +0000)
includes/User.php

index 6888de3..578e324 100644 (file)
@@ -2309,7 +2309,10 @@ class User {
                }
                
                wfRunHooks( 'UserSetCookies', array( $this, &$session, &$cookies ) );
-               $_SESSION = $session + $_SESSION;
+               #check for null, since the hook could cause a null value 
+               if ( !is_null( $session ) && !is_null( $_SESSION ) ){
+                       $_SESSION = $session + $_SESSION;
+               }
                foreach ( $cookies as $name => $value ) {
                        if ( $value === false ) {
                                $this->clearCookie( $name );