From 0d5b56be224e2e4981d4ae6655ed42e05bce42b9 Mon Sep 17 00:00:00 2001 From: Matthias Goudjil Date: Wed, 30 Oct 2024 17:36:20 +0100 Subject: [PATCH] fix: #37151 - [carrier-ranges] fix exception displayed when deleting a range for a specific zone --- .../IdentifiableObject/DataHandler/CarrierFormDataHandler.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Core/Form/IdentifiableObject/DataHandler/CarrierFormDataHandler.php b/src/Core/Form/IdentifiableObject/DataHandler/CarrierFormDataHandler.php index 76119f922e9bd..7964f46a5801f 100644 --- a/src/Core/Form/IdentifiableObject/DataHandler/CarrierFormDataHandler.php +++ b/src/Core/Form/IdentifiableObject/DataHandler/CarrierFormDataHandler.php @@ -126,6 +126,9 @@ private function formatFormRangesData(array $data): array foreach ($data as $zone) { foreach ($zone['ranges'] as $range) { + if ($range['from'] === null || $range['to'] === null) { + continue; + } $ranges[] = [ 'id_zone' => $zone['zoneId'], 'range_from' => $range['from'],