diff options
| author | ilotterytea <iltsu@alright.party> | 2025-12-11 00:20:43 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2025-12-11 00:20:43 +0500 |
| commit | 7e413a5d37346ec9512dca230f635dd57f1798e6 (patch) | |
| tree | 4ac0b0f9fa9d4be590d3f192c701a0136df9d0f4 | |
| parent | 6527c452e1a48f52afea00ad82507fe8a02bd5ea (diff) | |
upd: check if session exists
| -rw-r--r-- | lib/alert.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/alert.php b/lib/alert.php index 300d58c..97cb302 100644 --- a/lib/alert.php +++ b/lib/alert.php @@ -11,7 +11,8 @@ function generate_alert(string $path, string $error, int $status = 400) "data" => null ]); } else { - session_start(); + if (session_status() != PHP_SESSION_ACTIVE) + session_start(); $_SESSION['alert'] = [ 'code' => $status, 'reason' => $error |
