summaryrefslogtreecommitdiff
path: root/src/alert.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/alert.php')
-rw-r--r--src/alert.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/alert.php b/src/alert.php
index 62f1887..62045d5 100644
--- a/src/alert.php
+++ b/src/alert.php
@@ -10,7 +10,7 @@ function generate_alert(string $path, string $error, int $status = 400)
"data" => null
]);
} else {
- header("Location: $path?error_status=$status&error_reason=$error");
+ header("Location: $path" . (str_contains($path, "?") ? "&" : "?") . "error_status=$status&error_reason=$error");
}
}