page: fix variable dependencies in error headers
authorMischa POSLAWSKY <perl@shiar.org>
Mon, 30 Dec 2019 06:43:03 +0000 (07:43 +0100)
committerMischa POSLAWSKY <perl@shiar.org>
Wed, 1 Jan 2020 10:10:37 +0000 (11:10 +0100)
Editor checks broken in page.inc.php being called from fail() function.

page.php

index fb0c4ddcba96d7edd2b3cd28bbbd3f1ea75017fc..e23b3e23bce2a5abdc1e975d3108774d697407b9 100644 (file)
--- a/page.php
+++ b/page.php
@@ -83,6 +83,7 @@ set_include_path(implode(PATH_SEPARATOR, [ DOCROOT, __DIR__ ]));
 
 function fail($error)
 {
+       global $User, $Page, $Args;
        http_response_code(500);
        if (!isset($Article)) {
                $Article = new ArchiveArticle(NULL);