From 0ee4e4ae8e3f78a8f24696ae73fd474f4436886b Mon Sep 17 00:00:00 2001 From: ALTITUDE DEV Date: Sat, 30 Dec 2023 08:28:45 +0100 Subject: [PATCH 1/2] Fix bug 4.4.4 spark not working After upgrading 4.4.3 to 4.4.4 a bug are coming, spark not launching the CI with cmd. php spark server* Error log: Undefined global variable $_SESSION at SYSTEMPATH\Session\Session.php:499 Backtrace: 1 SYSTEMPATH\Session\Session.php:499 CodeIgniter\Debug\Exceptions()->errorHandler(2, 'Undefined global variable $_SESSION', 'C:\\wamp64\\www\\system\\Session\\Session.php', 499) My fix working with no errors and launching correctly CI. --- system/Session/Session.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/Session/Session.php b/system/Session/Session.php index 5c087579a2e4..94017d27f6dc 100644 --- a/system/Session/Session.php +++ b/system/Session/Session.php @@ -496,7 +496,7 @@ public function get(?string $key = null) return $value; } - if ($_SESSION === []) { + if (empty($_SESSION) || $_SESSION === []) { return $key === null ? [] : null; } From 6dda6364f0790f5b7961418ffa6ff9294a08a238 Mon Sep 17 00:00:00 2001 From: ALTITUDE DEV Date: Sat, 30 Dec 2023 08:58:03 +0100 Subject: [PATCH 2/2] Update Session.php bug fix --- system/Session/Session.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/Session/Session.php b/system/Session/Session.php index 94017d27f6dc..875387f29827 100644 --- a/system/Session/Session.php +++ b/system/Session/Session.php @@ -496,7 +496,7 @@ public function get(?string $key = null) return $value; } - if (empty($_SESSION) || $_SESSION === []) { + if (! isset($_SESSION) || $_SESSION === []) { return $key === null ? [] : null; }