Remove use of 'ReturnTypeWillChange'.

'ReturnTypeWillChange' was a workaround needed until we reached PHP 8.0, which introduced union types and allowed alignment with 'SessionHandlerInterface'.
This commit is contained in:
wn_
2024-12-10 19:25:26 +00:00
parent 1742fb65c5
commit 333bab90a7

View File

@@ -53,7 +53,6 @@ class Sessions implements \SessionHandlerInterface {
return true;
}
#[\ReturnTypeWillChange]
public function read(string $id): false|string {
$sth = Db::pdo()->prepare('SELECT data FROM ttrss_sessions WHERE id=?');
$sth->execute([$id]);
@@ -93,7 +92,6 @@ class Sessions implements \SessionHandlerInterface {
/**
* @return int|false the number of deleted sessions on success, or false on failure
*/
#[\ReturnTypeWillChange]
public function gc(int $max_lifetime): false|int {
$result = Db::pdo()->query('DELETE FROM ttrss_sessions WHERE expire < ' . time());
return $result === false ? false : $result->rowCount();