From de1770868bb4af8fc1143d8663c8fbc9a2ac676b Mon Sep 17 00:00:00 2001 From: Nate Douglas Date: Wed, 15 Nov 2023 11:36:51 -0500 Subject: [PATCH] VACMS-16132: Fix content release on D10. (#16133) --- .../src/Controller/FrontendVersionAutocompleteController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docroot/modules/custom/va_gov_content_release/src/Controller/FrontendVersionAutocompleteController.php b/docroot/modules/custom/va_gov_content_release/src/Controller/FrontendVersionAutocompleteController.php index dee748c71c8..a0398b8f134 100644 --- a/docroot/modules/custom/va_gov_content_release/src/Controller/FrontendVersionAutocompleteController.php +++ b/docroot/modules/custom/va_gov_content_release/src/Controller/FrontendVersionAutocompleteController.php @@ -69,12 +69,12 @@ public function handleAutocomplete(Request $request, string $frontend, int $coun $frontend = Frontend::from($frontend); } catch (\InvalidArgumentException $e) { - return JsonResponse::create(['error' => 'Invalid frontend type provided.']); + return new JsonResponse(['error' => 'Invalid frontend type provided.']); } $input = $request->query->get('q') ?? 'main'; $query = mb_strtolower($input); $results = $this->frontendVersionSearch->getMatchingReferences($frontend, $query, $count); - return JsonResponse::create($results); + return new JsonResponse($results); } }