From 59620f50adc520126493ce5e1605425823353204 Mon Sep 17 00:00:00 2001 From: Bloafer Date: Tue, 8 Oct 2024 11:37:28 +0100 Subject: [PATCH 1/2] Fixes deprecated errors on 8.3 --- library/Zend/Session/SaveHandler/DbTable.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/library/Zend/Session/SaveHandler/DbTable.php b/library/Zend/Session/SaveHandler/DbTable.php index 0efdbc08f4..9900176400 100644 --- a/library/Zend/Session/SaveHandler/DbTable.php +++ b/library/Zend/Session/SaveHandler/DbTable.php @@ -224,7 +224,7 @@ public function __destruct() * * @param int $lifetime * @param boolean $overrideLifetime (optional) - * @return $this + * @return Zend_Session_SaveHandler_DbTable * @throws Zend_Session_SaveHandler_Exception */ public function setLifetime($lifetime, $overrideLifetime = null) @@ -264,7 +264,7 @@ public function getLifetime() * Set whether or not the lifetime of an existing session should be overridden * * @param boolean $overrideLifetime - * @return $this + * @return Zend_Session_SaveHandler_DbTable */ public function setOverrideLifetime($overrideLifetime) { @@ -290,7 +290,7 @@ public function getOverrideLifetime() * @param string $name * @return boolean */ - public function open($save_path, $name) + public function open($save_path, $name): bool { $this->_sessionSavePath = $save_path; $this->_sessionName = $name; @@ -303,7 +303,7 @@ public function open($save_path, $name) * * @return boolean */ - public function close() + public function close(): bool { return true; } @@ -314,7 +314,7 @@ public function close() * @param string $id * @return string */ - public function read($id) + public function read($id): string { $return = ''; @@ -338,7 +338,7 @@ public function read($id) * @param string $data * @return boolean */ - public function write($id, $data) + public function write($id, $data): bool { $data = [$this->_modifiedColumn => time(), $this->_dataColumn => (string) $data]; @@ -366,7 +366,7 @@ public function write($id, $data) * @param string $id * @return boolean */ - public function destroy($id) + public function destroy($id): bool { $this->delete($this->_getPrimary($id, self::PRIMARY_TYPE_WHERECLAUSE)); return true; //always return true, since if nothing can be deleted, it is already deleted and thats OK. @@ -378,7 +378,7 @@ public function destroy($id) * @param int $maxlifetime * @return true */ - public function gc($maxlifetime) + public function gc($maxlifetime): int|false { $this->delete($this->getAdapter()->quoteIdentifier($this->_modifiedColumn, true) . ' + ' . $this->getAdapter()->quoteIdentifier($this->_lifetimeColumn, true) . ' < ' From 19bc8cff9acaf0b090574baefa81c044fbfb565a Mon Sep 17 00:00:00 2001 From: Bloafer Date: Tue, 8 Oct 2024 11:41:01 +0100 Subject: [PATCH 2/2] Update DbTable.php --- library/Zend/Session/SaveHandler/DbTable.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/Zend/Session/SaveHandler/DbTable.php b/library/Zend/Session/SaveHandler/DbTable.php index 9900176400..df627a0a14 100644 --- a/library/Zend/Session/SaveHandler/DbTable.php +++ b/library/Zend/Session/SaveHandler/DbTable.php @@ -224,7 +224,7 @@ public function __destruct() * * @param int $lifetime * @param boolean $overrideLifetime (optional) - * @return Zend_Session_SaveHandler_DbTable + * @return $this * @throws Zend_Session_SaveHandler_Exception */ public function setLifetime($lifetime, $overrideLifetime = null) @@ -264,7 +264,7 @@ public function getLifetime() * Set whether or not the lifetime of an existing session should be overridden * * @param boolean $overrideLifetime - * @return Zend_Session_SaveHandler_DbTable + * @return $this */ public function setOverrideLifetime($overrideLifetime) {