From 4b32811424c24253151f4abb268e9e50a1269581 Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Fri, 18 Mar 2022 17:28:39 +0100 Subject: [PATCH] Tooltips/Errors * do not send 404 header for xml or tooltips --- pages/genericPage.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/genericPage.class.php b/pages/genericPage.class.php index a6d29fb4..032cf878 100644 --- a/pages/genericPage.class.php +++ b/pages/genericPage.class.php @@ -594,8 +594,6 @@ class GenericPage // unknown entry public function notFound(string $title = '', string $msg = '') : void { - header('HTTP/1.0 404 Not Found', true, 404); - if ($this->mode == CACHE_TYPE_TOOLTIP && method_exists($this, 'generateTooltip')) { header(MIME_TYPE_JSON); @@ -608,6 +606,8 @@ class GenericPage } else { + header('HTTP/1.0 404 Not Found', true, 404); + array_unshift($this->title, Lang::main('nfPageTitle')); $this->contribute = CONTRIBUTE_NONE;