summaryrefslogtreecommitdiff
path: root/lib/alert.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/alert.php')
-rw-r--r--lib/alert.php3
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