Skip to content

Commit

Permalink
Fix bug 4.4.4 spark not working
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ALTITUDE-DEV-FR authored Dec 30, 2023
1 parent c85b65c commit 0ee4e4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion system/Session/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ public function get(?string $key = null)
return $value;
}

if ($_SESSION === []) {
if (empty($_SESSION) || $_SESSION === []) {

Check failure on line 499 in system/Session/Session.php

View workflow job for this annotation

GitHub Actions / PHP Static Analysis

Construct empty() is not allowed. Use more strict comparison.
return $key === null ? [] : null;
}

Expand Down

0 comments on commit 0ee4e4a

Please sign in to comment.