From bbd26097f6af7abd59213a2f439d58f567e897b1 Mon Sep 17 00:00:00 2001 From: JoshuaLicense Date: Tue, 28 May 2024 10:46:26 +0100 Subject: [PATCH] fix: fix count by `null` in `TransferVehicleController` --- .../Controller/Licence/Vehicle/TransferVehicleController.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/module/Olcs/src/Controller/Licence/Vehicle/TransferVehicleController.php b/module/Olcs/src/Controller/Licence/Vehicle/TransferVehicleController.php index 60dfe8358..c5cce7d0f 100644 --- a/module/Olcs/src/Controller/Licence/Vehicle/TransferVehicleController.php +++ b/module/Olcs/src/Controller/Licence/Vehicle/TransferVehicleController.php @@ -107,8 +107,7 @@ public function postAction() $validationErrors = []; if (empty($selectedVehicles)) { $validationErrors[] = 'licence.vehicle.transfer.error.no-vehicle-selected'; - } - if (count($selectedVehicles) > static::VEHICLE_TRANSFER_LIMIT) { + } elseif (count($selectedVehicles) > static::VEHICLE_TRANSFER_LIMIT) { $validationErrors[] = 'licence.vehicle.transfer.error.too-many-vehicles-selected'; }