From ce443818d4a54c2f1d2d058c5cf2347e470d0d46 Mon Sep 17 00:00:00 2001 From: Michael Gapczynski Date: Wed, 2 Jan 2013 19:59:04 -0500 Subject: [PATCH] Check if oc_token cookie exists before trying to use it --- lib/base.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/base.php b/lib/base.php index 94fb797962..ef203b33c2 100644 --- a/lib/base.php +++ b/lib/base.php @@ -557,7 +557,9 @@ class OC OC_App::loadApps(); OC_User::setupBackends(); if (isset($_GET["logout"]) and ($_GET["logout"])) { - OC_Preferences::deleteKey(OC_User::getUser(), 'login_token', $_COOKIE['oc_token']); + if (isset($_COOKIE['oc_token'])) { + OC_Preferences::deleteKey(OC_User::getUser(), 'login_token', $_COOKIE['oc_token']); + } OC_User::logout(); header("Location: " . OC::$WEBROOT . '/'); } else {