From: Vincent Vanwaelscappel Date: Fri, 25 Aug 2023 13:51:47 +0000 (+0200) Subject: fix #6199 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=30c5b062d7262a844c10dc5ab347368c7f9e4a40;p=cubedesigners_userdatabase.git fix #6199 --- diff --git a/src/app/Models/Company.php b/src/app/Models/Company.php index eaab741..ff465de 100644 --- a/src/app/Models/Company.php +++ b/src/app/Models/Company.php @@ -247,6 +247,10 @@ class Company extends CubistMagicAbstractModel protected function setComposedAttributes() { + if (null === $this->billing_address) { + $this->billing_address = []; + } + $this->billing_address = array_merge(['name' => '', 'address' => '', 'postcode' => '', 'city' => '', 'country' => ''], $this->billing_address); $billingAddress = ($this->billing_address['name'] ?: $this->name) . "\n"; $billingAddress .= ($this->billing_address['address'] ?: $this->address['address']) . "\n"; $billingAddress .= ($this->billing_address['postcode'] ?: $this->address['postcode']) . ' ' . ($this->billing_address['city'] ?: $this->address['city']) . "\n";