]> source.dussan.org Git - nextcloud-server.git/commitdiff
Check if oc_token cookie exists before trying to use it
authorMichael Gapczynski <mtgap@owncloud.com>
Thu, 3 Jan 2013 00:59:04 +0000 (19:59 -0500)
committerMichael Gapczynski <mtgap@owncloud.com>
Thu, 3 Jan 2013 00:59:04 +0000 (19:59 -0500)
lib/base.php

index 94fb7979620bbf2ffee6201c70c2c8ed083462ed..ef203b33c2b1b45846d7edb54f789e16971a2e7c 100644 (file)
@@ -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 {