git.shiar.nl
/
minimedit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
page: fix variable dependencies in error headers
[minimedit.git]
/
page.php
diff --git
a/page.php
b/page.php
index d2532a5733eb64e9e6b83396bb4095e0606b634f..e23b3e23bce2a5abdc1e975d3108774d697407b9 100644
(file)
--- a/
page.php
+++ b/
page.php
@@
-83,6
+83,7
@@
set_include_path(implode(PATH_SEPARATOR, [ DOCROOT, __DIR__ ]));
function fail($error)
{
function fail($error)
{
+ global $User, $Page, $Args;
http_response_code(500);
if (!isset($Article)) {
$Article = new ArchiveArticle(NULL);
http_response_code(500);
if (!isset($Article)) {
$Article = new ArchiveArticle(NULL);
@@
-91,7
+92,7
@@
function fail($error)
include_once 'page.inc.php';
ob_start();
require '500.inc.html';
include_once 'page.inc.php';
ob_start();
require '500.inc.html';
- print getoutput(['debug' =>
$error
]);
+ print getoutput(['debug' =>
htmlspecialchars($error)
]);
}
set_exception_handler('fail');
}
set_exception_handler('fail');