Lets see if we can get this cookie thing right this time.
authorjangliss <jangliss@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 17 Dec 2002 19:13:51 +0000 (19:13 +0000)
committerjangliss <jangliss@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 17 Dec 2002 19:13:51 +0000 (19:13 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4278 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/global.php

index 6ee6f9f..5221b44 100644 (file)
@@ -158,11 +158,10 @@ function sqsession_destroy() {
      */
 
     global $base_uri;
-    $cookie_params = session_get_cookie_params();
-    setcookie(session_name(), '', time() - 5, $cookie_params['path'],
-        $cookie_params['domain']);
-    setcookie('username','',time() - 5,$base_uri);
-    setcookie('key','',time() - 5,$base_uri);
+
+    if (isset($_COOKIE[session_name()])) setcookie(session_name(), '', time() - 5, $base_uri);
+    if (isset($_COOKIE['username'])) setcookie('username','',time() - 5,$base_uri);
+    if (isset($_COOKIE['key'])) setcookie('key','',time() - 5,$base_uri);
 
     $sessid = session_id();
     if (!empty( $sessid )) {