We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
BadRequestHttpException
extra_options
1 parent 32224c4 commit 17bb6afCopy full SHA for 17bb6af
src/Autocomplete/src/Controller/EntityAutocompleteController.php
@@ -76,7 +76,11 @@ private function getExtraOptions(Request $request): array
76
return [];
77
}
78
79
- $extraOptions = $this->getDecodedExtraOptions($request->query->getString(self::EXTRA_OPTIONS));
+ try {
80
+ $extraOptions = $this->getDecodedExtraOptions($request->query->getString(self::EXTRA_OPTIONS));
81
+ } catch (\JsonException) {
82
+ throw new BadRequestHttpException('The extra options cannot be parsed.');
83
+ }
84
85
if (!\array_key_exists(AutocompleteChoiceTypeExtension::CHECKSUM_KEY, $extraOptions)) {
86
throw new BadRequestHttpException('The extra options are missing the checksum.');
0 commit comments