From d3f6d525253eb7bb041d9436cbf213c10524a85c Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Wed, 28 Oct 2020 14:02:08 +0100 Subject: Fix compatiliby issue on login with PHP 7.1 session_set_cookie_params does not return any value in PHP 7.1 --- application/security/SessionManager.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'application/security') diff --git a/application/security/SessionManager.php b/application/security/SessionManager.php index 36df8c1c..96bf193c 100644 --- a/application/security/SessionManager.php +++ b/application/security/SessionManager.php @@ -293,9 +293,12 @@ class SessionManager return session_start(); } - public function cookieParameters(int $lifeTime, string $path, string $domain): bool + /** + * Be careful, return type of session_set_cookie_params() changed between PHP 7.1 and 7.2. + */ + public function cookieParameters(int $lifeTime, string $path, string $domain): void { - return session_set_cookie_params($lifeTime, $path, $domain); + session_set_cookie_params($lifeTime, $path, $domain); } public function regenerateId(bool $deleteOldSession = false): bool -- cgit v1.2.3