From 5bfed78ec0aadb8f7a7fc9674ac3eb54edc0b794 Mon Sep 17 00:00:00 2001 From: omair saleh Date: Wed, 9 Jun 2021 14:17:31 +0800 Subject: [PATCH] fix bug with listing segment where bank id doesn't exist --- .../ServiceTypes/Services/FetchesServiceConfigurations.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Classes/Modules/ServiceTypes/Services/FetchesServiceConfigurations.php b/app/Classes/Modules/ServiceTypes/Services/FetchesServiceConfigurations.php index ae418ebf..d641d641 100644 --- a/app/Classes/Modules/ServiceTypes/Services/FetchesServiceConfigurations.php +++ b/app/Classes/Modules/ServiceTypes/Services/FetchesServiceConfigurations.php @@ -35,8 +35,8 @@ class FetchesServiceConfigurations return array_merge([ 'active' => (int) $constant->detail->is_active ?? false, 'billable' => (int) $constant->detail->is_billable ?? false, - 'bank_id' => $constant->detail->bank_id ?? '', - 'bank_info' => $constant->detail->bank_id ? $this->fetchesServiceBankConfigurations->execute($constant) : '', + 'bank_id' => property_exists($constant->detail, 'bank_id') ? $constant->detail->bank_id : '', + 'bank_info' => property_exists($constant->detail, 'bank_id') ? $this->fetchesServiceBankConfigurations->execute($constant) : '', 'currencies' => $this->fetchesServiceCurrenciesConfigurations->execute($constant) ], $this->addConfigurations($constant)->toArray());