From 2137d67496232fb6c373598c2f046e24fc4adb82 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 28 Mar 2013 12:40:56 +0400 Subject: [PATCH] sessions: properly check for cookie being set --- include/sessions.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/include/sessions.php b/include/sessions.php index 23c19441e..1b1d00cc2 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, '/'); } } }