diff --git a/system/Session/Session.php b/system/Session/Session.php index 5c087579a2e4..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 ($_SESSION === []) { + if (! isset($_SESSION) || $_SESSION === []) { return $key === null ? [] : null; }