Skip to content

Commit 06d7e2a

Browse files
authored
Merge pull request #2450 from nowackipawel/patch-76
CRITICAL when $_SESSION is null / Argument 2 passed to dot_array_search() must be []
2 parents 507462b + 8758dbe commit 06d7e2a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

system/Session/Session.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ public function set($data, $value = null)
497497
*/
498498
public function get(string $key = null)
499499
{
500-
if (! empty($key) && ! is_null($value = dot_array_search($key, $_SESSION)))
500+
if (! empty($key) && ! is_null($value = dot_array_search($key, $_SESSION??[])))
501501
{
502502
return $value;
503503
}

0 commit comments

Comments
 (0)