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 <louis@chmn.me>
pull/1562/head
Louis Chemineau 2023-01-04 12:19:48 +01:00
rodzic f945d5fe63
commit 9263ff099a
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -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);
}