summaryrefslogtreecommitdiff
path: root/404.php
diff options
context:
space:
mode:
Diffstat (limited to '404.php')
-rw-r--r--404.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/404.php b/404.php
index 7d49c8b..7d272d3 100644
--- a/404.php
+++ b/404.php
@@ -6,10 +6,15 @@ include_once "{$_SERVER['DOCUMENT_ROOT']}/lib/accounts.php";
authorize_user();
-$status = intval($_GET["error_status"] ?? "404");
+$alert = $_SESSION['alert'] ?? [
+ 'code' => '404',
+ 'reason' => 'Not found'
+];
+
+$status = intval($alert['code']);
http_response_code($status);
-$reason = str_safe($_GET["error_reason"] ?? "Not found", 200);
+$reason = str_safe($alert['reason'], 200);
?>
<html>