From: Mischa POSLAWSKY Date: Sat, 15 May 2021 21:53:15 +0000 (+0200) Subject: widget/reply: ignore missing user object X-Git-Tag: v5.3~1 X-Git-Url: http://git.shiar.nl/minimedit.git/commitdiff_plain/9eec87784fb92f622c2be8bc53ebd4b98212b703 widget/reply: ignore missing user object Fix include without site setup for testing. --- 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 = [