From: Andrew Dolgov Date: Thu, 28 Mar 2013 08:40:56 +0000 (+0400) Subject: sessions: properly check for cookie being set X-Git-Tag: 1.7.6~210 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=2137d67496232fb6c373598c2f046e24fc4adb82;p=tt-rss.git sessions: properly check for cookie being set --- diff --git a/include/sessions.php b/include/sessions.php index 23c19441..1b1d00cc 100644 --- a/include/sessions.php +++ b/include/sessions.php @@ -103,14 +103,12 @@ } 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, '/'); } } }