From a0e6e9a26c9a9950253187077acdae8c51cc3339 Mon Sep 17 00:00:00 2001 From: Joe Hoyle Date: Fri, 1 Mar 2024 11:34:00 +0200 Subject: [PATCH 1/2] Fix < php 8.0 Union return type was only added in 7.4. --- inc/session_handler/class-disallowed-session-handler.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/inc/session_handler/class-disallowed-session-handler.php b/inc/session_handler/class-disallowed-session-handler.php index ea752c0d..0690910c 100644 --- a/inc/session_handler/class-disallowed-session-handler.php +++ b/inc/session_handler/class-disallowed-session-handler.php @@ -29,7 +29,10 @@ function destroy( string $id ) : bool { trigger_error( 'PHP Sessions requires Redis integration, which is currently not activated.', E_USER_WARNING ); return false; } - function read( string $id ) : string | false { + /** + * @return string|false + */ + function read( string $id ) { trigger_error( 'PHP Sessions requires Redis integration, which is currently not activated.', E_USER_WARNING ); return false; } From 13877ebae9007c77f0e65d9f3fb05aabb344f389 Mon Sep 17 00:00:00 2001 From: Joe Hoyle Date: Fri, 1 Mar 2024 11:39:35 +0200 Subject: [PATCH 2/2] Another one --- inc/session_handler/class-disallowed-session-handler.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/inc/session_handler/class-disallowed-session-handler.php b/inc/session_handler/class-disallowed-session-handler.php index 0690910c..aa02c591 100644 --- a/inc/session_handler/class-disallowed-session-handler.php +++ b/inc/session_handler/class-disallowed-session-handler.php @@ -40,7 +40,10 @@ function write( string $id, string $data ) : bool { trigger_error( 'PHP Sessions requires Redis integration, which is currently not activated.', E_USER_WARNING ); return false; } - function gc( int $maxlifetime ) : int | false { + /** + * @return int|false + */ + function gc( int $maxlifetime ) { trigger_error( 'PHP Sessions requires Redis integration, which is currently not activated.', E_USER_WARNING ); return false; }