Skip to content

Commit c5c5e76

Browse files
committed
Fix bug caused by missing null check in Card controller.
1 parent 58110bf commit c5c5e76

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Controller/Profile/CardController.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,10 @@ final public function __invoke(ServerRequestInterface $request, array $args): Re
4747

4848
$contentType = $this->getContentTypeForFormat($format);
4949

50+
$serverParams = $request->getServerParams();
51+
$url = $serverParams["REQUEST_URI"] ?? '';
52+
5053
/** @noinspection PhpUndefinedMethodInspection */ // Method `readRdf` is defined by plugin
51-
$url = $request->getServerParams()["REQUEST_URI"];
5254
$content = $filesystem->readRdf($filePath, $format, $url);
5355

5456
return $this->createTextResponse($content)->withHeader('Content-Type', $contentType);

0 commit comments

Comments
 (0)