From ea0c4f3d8734767275b9cc82feb3835a54459066 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Nedv=C4=9Bd?= Date: Tue, 20 Dec 2022 14:08:22 +0100 Subject: [PATCH] Update ZasilkovnaBranch.php $this->region = $data['region'] ?? ""; $this->district = Tool::convertToString($data['district'] ?? null); --- src/Entity/ZasilkovnaBranch.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Entity/ZasilkovnaBranch.php b/src/Entity/ZasilkovnaBranch.php index dcc8009..ecdfa61 100644 --- a/src/Entity/ZasilkovnaBranch.php +++ b/src/Entity/ZasilkovnaBranch.php @@ -87,8 +87,8 @@ public function __construct(array $data) $this->claimAssistant = $data['claimAssistant'] === '1'; $this->packetConsignment = $data['packetConsignment'] === '1'; $this->maxWeight = (int) $data['maxWeight']; - $this->region = $data['region']; - $this->district = Tool::convertToString($data['district']); + $this->region = $data['region'] ?? ""; + $this->district = Tool::convertToString($data['district'] ?? null); $this->labelRouting = Tool::convertToString($data['labelRouting']); $this->labelName = Tool::convertToString($data['labelName']); $this->openingHours = new BranchOpeningHours((array) ($data['openingHours'] ?? []));