diff --git a/src/Controller/Transaction.php b/src/Controller/Transaction.php index a61c88080..2a46b093c 100644 --- a/src/Controller/Transaction.php +++ b/src/Controller/Transaction.php @@ -642,7 +642,7 @@ public function getAcceptedContentTypes(): MediaTypes { $formatQueryOption = $this->getFormat()->getValue(); - if (Str::startsWith($formatQueryOption, ['json', 'xml'])) { + if ($formatQueryOption && Str::startsWith($formatQueryOption, ['json', 'xml'])) { if (!in_array($formatQueryOption, ['json', 'xml'])) { throw new BadRequestException( 'invalid_short_format',