Tooltips/Errors

* do not send 404 header for xml or tooltips
This commit is contained in:
Sarjuuk
2022-03-18 17:28:39 +01:00
parent 4972cc0faf
commit 4b32811424

View File

@@ -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;