From 9eec87784fb92f622c2be8bc53ebd4b98212b703 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Sat, 15 May 2021 23:53:15 +0200 Subject: [PATCH] widget/reply: ignore missing user object Fix include without site setup for testing. --- upload.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upload.inc.php b/upload.inc.php index b4a056d..e270b76 100644 --- a/upload.inc.php +++ b/upload.inc.php @@ -48,7 +48,7 @@ function messagehtml($input) if (empty($input)) { return; } - if ($User->admin and preg_match('/\A<[a-z][^>]*>/', $input)) { + if ($User and $User->admin and preg_match('/\A<[a-z][^>]*>/', $input)) { return $input; # allow html input as is if privileged } $markup = [ -- 2.30.0