diff --git a/module/VuFind/src/VuFind/Session/Database.php b/module/VuFind/src/VuFind/Session/Database.php index a7321047ba1669f59c9a3307ed3739865926dd54..f2af30e722066ca99d96a32d79e2af177a09226a 100644 --- a/module/VuFind/src/VuFind/Session/Database.php +++ b/module/VuFind/src/VuFind/Session/Database.php @@ -65,11 +65,12 @@ class Database extends AbstractBase * @param string $sess_id The current session ID * @param string $data The session data to write * - * @return void + * @return bool */ public function write($sess_id, $data) { $this->getTable('Session')->writeSession($sess_id, $data); + return true; } /** @@ -101,4 +102,4 @@ class Database extends AbstractBase { $this->getTable('Session')->garbageCollect($sess_maxlifetime); } -} \ No newline at end of file +} diff --git a/module/VuFind/src/VuFind/Session/File.php b/module/VuFind/src/VuFind/Session/File.php index 4d10d3b651a390f781eb53b3acf5631a4eb8a313..be1690b0aa4dfb7adf87102fc5851c5be938f607 100644 --- a/module/VuFind/src/VuFind/Session/File.php +++ b/module/VuFind/src/VuFind/Session/File.php @@ -106,7 +106,7 @@ class File extends AbstractBase * @param string $sess_id The current session ID * @param string $data The session data to write * - * @return void + * @return bool */ public function write($sess_id, $data) { @@ -115,7 +115,7 @@ class File extends AbstractBase $return = fwrite($fp, $data); fclose($fp); if ($return !== false) { - return; + return true; } } // If we got this far, something went wrong with the file output... @@ -123,6 +123,7 @@ class File extends AbstractBase // outside of the context of exception handling, so all we can do is // echo a message. echo 'Cannot write session to ' . $sess_file . "\n"; + return false; } /** diff --git a/module/VuFind/src/VuFind/Session/Memcache.php b/module/VuFind/src/VuFind/Session/Memcache.php index 8d69116374d117ff3322e026d1b27f92951381a1..733fc7a86ed9e67f1b6bbdbf80ce568f5e75467f 100644 --- a/module/VuFind/src/VuFind/Session/Memcache.php +++ b/module/VuFind/src/VuFind/Session/Memcache.php @@ -95,7 +95,7 @@ class Memcache extends AbstractBase * @param string $sess_id The current session ID * @param string $data The session data to write * - * @return void + * @return bool */ public function write($sess_id, $data) { @@ -120,4 +120,4 @@ class Memcache extends AbstractBase // Perform Memcache-specific cleanup: return $this->getConnection()->delete("vufind_sessions/{$sess_id}"); } -} \ No newline at end of file +}