aboutsummaryrefslogtreecommitdiffstats
path: root/lib/base.php
diff options
context:
space:
mode:
authorMichael Gapczynski <mtgap@owncloud.com>2013-01-02 19:59:04 -0500
committerMichael Gapczynski <mtgap@owncloud.com>2013-01-02 19:59:04 -0500
commitce443818d4a54c2f1d2d058c5cf2347e470d0d46 (patch)
tree7d1c804dcbf26fc8783ad3176f1595d59025af92 /lib/base.php
parent34e5cb5070a36f2462cf53b7c64c68931dd68d45 (diff)
downloadnextcloud-server-ce443818d4a54c2f1d2d058c5cf2347e470d0d46.tar.gz
nextcloud-server-ce443818d4a54c2f1d2d058c5cf2347e470d0d46.zip
Check if oc_token cookie exists before trying to use it
Diffstat (limited to 'lib/base.php')
-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 {