From 47f0f5553a52797f48d82813cc1bec31a3204e8f Mon Sep 17 00:00:00 2001 From: Cloud8 <4reading.rocks@gmail.com> Date: Mon, 12 Mar 2018 08:25:00 +0100 Subject: [PATCH] Do not return null from MemCache session handler. - Improves PHP 7 compatibility. --- module/VuFind/src/VuFind/Session/Memcache.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/VuFind/src/VuFind/Session/Memcache.php b/module/VuFind/src/VuFind/Session/Memcache.php index 1071c6bcf93..10d3f12e14a 100644 --- a/module/VuFind/src/VuFind/Session/Memcache.php +++ b/module/VuFind/src/VuFind/Session/Memcache.php @@ -86,7 +86,8 @@ class Memcache extends AbstractBase */ public function read($sess_id) { - return $this->getConnection()->get("vufind_sessions/{$sess_id}"); + $value = $this->getConnection()->get("vufind_sessions/{$sess_id}"); + return empty($value) ? '' : $value; } /** -- GitLab