diff --git a/src/QUI/ERP/Address.php b/src/QUI/ERP/Address.php index 6c9cc8ed9c960e7b447f653f22cd44e4c7985a05..b36b408cb2f601741fe392730ca78f103f928af6 100644 --- a/src/QUI/ERP/Address.php +++ b/src/QUI/ERP/Address.php @@ -23,15 +23,19 @@ class Address extends QUI\Users\Address /** * Address constructor. * - * @param array $data + * @param array|null $data * @param QUIUserInterface|null $User */ - public function __construct(array $data = [], QUI\Interfaces\Users\User $User = null) + public function __construct(?array $data = [], QUI\Interfaces\Users\User $User = null) { if ($User) { $this->User = $User; } + if (!$data) { + $data = []; + } + $this->setAttributes($data); if (isset($data['id'])) {