Skip to content

Commit 29538b6

Browse files
committed
Ignore memcached missing key error on dession destroy
1 parent 8f5141d commit 29538b6

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcacheSessionHandler.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,9 @@ public function write($sessionId, $data)
9595
*/
9696
public function destroy($sessionId)
9797
{
98-
return $this->memcache->delete($this->prefix.$sessionId);
98+
$this->memcache->delete($this->prefix.$sessionId);
99+
100+
return true;
99101
}
100102

101103
/**

src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcachedSessionHandler.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@ public function write($sessionId, $data)
101101
*/
102102
public function destroy($sessionId)
103103
{
104-
return $this->memcached->delete($this->prefix.$sessionId);
104+
$result = $this->memcached->delete($this->prefix.$sessionId);
105+
106+
return $result || $this->memcached->getResultCode() == \Memcached::RES_NOTFOUND;
105107
}
106108

107109
/**

0 commit comments

Comments
 (0)