From 9263ff099a6112911f593a16de4e91f3668605d3 Mon Sep 17 00:00:00 2001 From: Louis Chemineau Date: Wed, 4 Jan 2023 12:19:48 +0100 Subject: [PATCH] Fix detection of webfinger endpoint with no 'resource' param This is necessary to make the overview test pass. $subject was null so strpos was throwing an exception, probably since php8. Signed-off-by: Louis Chemineau --- lib/WellKnown/WebfingerHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/WellKnown/WebfingerHandler.php b/lib/WellKnown/WebfingerHandler.php index 7cabf75c..ec4a1004 100644 --- a/lib/WellKnown/WebfingerHandler.php +++ b/lib/WellKnown/WebfingerHandler.php @@ -101,7 +101,7 @@ class WebfingerHandler implements IHandler { * @return IResponse|null */ public function handleWebfinger(IRequestContext $context): ?IResponse { - $subject = $context->getHttpRequest()->getParam('resource'); + $subject = $context->getHttpRequest()->getParam('resource') ?? ''; if (strpos($subject, 'acct:') === 0) { $subject = substr($subject, 5); }