From ff920711a0af5ac088a3d8284b3b91be03a7b7e9 Mon Sep 17 00:00:00 2001 From: William Date: Mon, 24 Jan 2022 09:00:22 +0100 Subject: [PATCH] PHP 7.4 does NOT support mixed type hinting ;_; --- app/core/Session.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/core/Session.php b/app/core/Session.php index 83fe466..c0fe5eb 100644 --- a/app/core/Session.php +++ b/app/core/Session.php @@ -17,7 +17,8 @@ class Session return array_key_exists($key, $_SESSION); } - public function get(string $key): mixed + // Returns mixed but php 7.4 DOES NOT SUPPORT THAT TYPE HINT >:(( + public function get(string $key) { if ($this->has($key)) { @@ -26,7 +27,7 @@ class Session return NULL; } - public function set(string $key, mixed $value): void + public function set(string $key, $value): void { $_SESSION[$key] = $value; }