From 040db4ca490c7b98b7be4ce3a3a2ca36547bf515 Mon Sep 17 00:00:00 2001 From: JoshuaLicense Date: Tue, 28 May 2024 12:54:49 +0100 Subject: [PATCH] fix: resolve `array_key_exists` type error (#160) --- .../src/Controller/Licence/Vehicle/RemoveVehicleController.php | 2 +- .../Vehicle/Reprint/ReprintLicenceVehicleDiscController.php | 2 +- .../Controller/Licence/Vehicle/TransferVehicleController.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/module/Olcs/src/Controller/Licence/Vehicle/RemoveVehicleController.php b/module/Olcs/src/Controller/Licence/Vehicle/RemoveVehicleController.php index bafb97cc2..b5e6337fb 100644 --- a/module/Olcs/src/Controller/Licence/Vehicle/RemoveVehicleController.php +++ b/module/Olcs/src/Controller/Licence/Vehicle/RemoveVehicleController.php @@ -119,7 +119,7 @@ protected function alterSearchForm(): void $formData = $this->getRequest()->getQuery(); $form->setData($formData); - if (array_key_exists('vehicleSearch', $formData)) { + if (array_key_exists('vehicleSearch', $formData->toArray())) { $form->isValid(); } diff --git a/module/Olcs/src/Controller/Licence/Vehicle/Reprint/ReprintLicenceVehicleDiscController.php b/module/Olcs/src/Controller/Licence/Vehicle/Reprint/ReprintLicenceVehicleDiscController.php index 1128f1dfc..c8fa46c97 100644 --- a/module/Olcs/src/Controller/Licence/Vehicle/Reprint/ReprintLicenceVehicleDiscController.php +++ b/module/Olcs/src/Controller/Licence/Vehicle/Reprint/ReprintLicenceVehicleDiscController.php @@ -141,7 +141,7 @@ protected function configureSearchFormForIndex(Form $form, Request $request): vo $formData = $request->getQuery(); $form->setData($formData); - if (array_key_exists('vehicleSearch', $formData)) { + if (array_key_exists('vehicleSearch', $formData->toArray())) { $form->isValid(); } diff --git a/module/Olcs/src/Controller/Licence/Vehicle/TransferVehicleController.php b/module/Olcs/src/Controller/Licence/Vehicle/TransferVehicleController.php index 60dfe8358..01a08c39f 100644 --- a/module/Olcs/src/Controller/Licence/Vehicle/TransferVehicleController.php +++ b/module/Olcs/src/Controller/Licence/Vehicle/TransferVehicleController.php @@ -215,7 +215,7 @@ protected function alterSearchForm(): void $formData = $this->getRequest()->getQuery(); $form->setData($formData); - if (array_key_exists('vehicleSearch', $formData)) { + if (array_key_exists('vehicleSearch', $formData->toArray())) { $form->isValid(); }