aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/base.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/base.php b/lib/base.php
index 94fb7979620..ef203b33c2b 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 {