Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes deprecated errors on PHP 8.3 #448

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions library/Zend/Session/SaveHandler/DbTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@
* @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;
Expand All @@ -303,7 +303,7 @@
*
* @return boolean
*/
public function close()
public function close(): bool
{
return true;
}
Expand All @@ -314,7 +314,7 @@
* @param string $id
* @return string
*/
public function read($id)
public function read($id): string
{
$return = '';

Expand All @@ -338,7 +338,7 @@
* @param string $data
* @return boolean
*/
public function write($id, $data)
public function write($id, $data): bool
{
$data = [$this->_modifiedColumn => time(),
$this->_dataColumn => (string) $data];
Expand Down Expand Up @@ -366,7 +366,7 @@
* @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.
Expand All @@ -378,7 +378,7 @@
* @param int $maxlifetime
* @return true
*/
public function gc($maxlifetime)
public function gc($maxlifetime): int|false

Check failure on line 381 in library/Zend/Session/SaveHandler/DbTable.php

View workflow job for this annotation

GitHub Actions / Tests on PHP 7.2

Parse error: syntax error, unexpected '|', expecting ';' or '{' in ./library/Zend/Session/SaveHandler/DbTable.php on line 381

Check failure on line 381 in library/Zend/Session/SaveHandler/DbTable.php

View workflow job for this annotation

GitHub Actions / Tests on PHP 7.3

Parse error: syntax error, unexpected '|', expecting ';' or '{' in ./library/Zend/Session/SaveHandler/DbTable.php on line 381

Check failure on line 381 in library/Zend/Session/SaveHandler/DbTable.php

View workflow job for this annotation

GitHub Actions / Tests on PHP 7.4

Parse error: syntax error, unexpected '|', expecting ';' or '{' in ./library/Zend/Session/SaveHandler/DbTable.php on line 381
{
$this->delete($this->getAdapter()->quoteIdentifier($this->_modifiedColumn, true) . ' + '
. $this->getAdapter()->quoteIdentifier($this->_lifetimeColumn, true) . ' < '
Expand Down
Loading