]> git.wh0rd.org Git - tt-rss.git/commitdiff
sessions: properly check for cookie being set
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Thu, 28 Mar 2013 08:40:56 +0000 (12:40 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Thu, 28 Mar 2013 08:40:56 +0000 (12:40 +0400)
include/sessions.php

index 23c19441e5acbea0748fd9b5d5c5746492b5baf4..1b1d00cc27237d55c4f09d7640fa8a655f0743b1 100644 (file)
        }
 
        if (!defined('TTRSS_SESSION_NAME') || TTRSS_SESSION_NAME != 'ttrss_api_sid') {
-               if ($_COOKIE[$session_name]) {
+               if (isset($_COOKIE[$session_name])) {
                        @session_start();
 
                        if (!$_SESSION["uid"]) {
                                session_destroy();
-                               if (isset($_COOKIE[session_name()])) {
-                                  setcookie(session_name(), '', time()-42000, '/');
-                               }
+                          setcookie(session_name(), '', time()-42000, '/');
                        }
                }
        }