From d438147ddc057e27e45954ca9f3ccb47d6292a34 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Fri, 5 Jun 2015 19:36:13 +0200 Subject: [PATCH] Fix SQL error on logout when using session_storage=php (#1490421) --- CHANGELOG | 1 + program/lib/Roundcube/rcube_session.php | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 7cb584024..408b1661a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,7 @@ CHANGELOG Roundcube Webmail =========================== - Fix "Importing..." message does not hide on error (#1490422) +- Fix SQL error on logout when using session_storage=php (#1490421) RELEASE 1.1.2 ------------- diff --git a/program/lib/Roundcube/rcube_session.php b/program/lib/Roundcube/rcube_session.php index 8306a0687..d15d14610 100644 --- a/program/lib/Roundcube/rcube_session.php +++ b/program/lib/Roundcube/rcube_session.php @@ -144,7 +144,15 @@ class rcube_session */ public function destroy($key) { - return $this->memcache ? $this->mc_destroy($key) : $this->db_destroy($key); + if ($this->storage == 'memcache' && $this->memcache) { + return $this->mc_destroy($key); + } + else if ($this->storage == 'db') { + return $this->db_destroy($key); + } + else { + return true; + } }