Bug #8626: Fix updating memcache tracking info on session destroy
authorMichael M Slusarz <slusarz@curecanti.org>
Tue, 6 Oct 2009 22:13:10 +0000 (16:13 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Tue, 6 Oct 2009 22:18:34 +0000 (16:18 -0600)
framework/SessionHandler/lib/Horde/SessionHandler/Memcache.php

index f7209ff..a82aecd 100644 (file)
@@ -234,16 +234,15 @@ class Horde_SessionHandler_Memcache extends Horde_SessionHandler
         $result = $this->_memcache->delete($id);
         $this->_memcache->unlock($id);
 
-        if ($result !== false &&
-            isset($this->_persistent)) {
-            $result = $this->_persistent->destroy($id);
-        }
-
-        if ($result !== false) {
+        if ($result === false) {
             Horde::logMessage('Failed to delete session (id = ' . $id . ')', __FILE__, __LINE__, PEAR_LOG_DEBUG);
             return false;
         }
 
+        if (isset($this->_persistent)) {
+            $result = $this->_persistent->destroy($id);
+        }
+
         if (!empty($this->_params['track'])) {
             $this->_memcache->lock($this->_trackID);
             $ids = $this->_memcache->get($this->_trackID);