From d4686e5848875b7c24a2d92f8de97aa4dbb57dcf Mon Sep 17 00:00:00 2001 From: Vladimir Poliakov Date: Thu, 22 Sep 2022 09:12:23 +0200 Subject: [PATCH] Fix compatibility with php 8.0 and older in convertCustomerAddressToAvaTaxAddress --- Framework/Interaction/Address.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Framework/Interaction/Address.php b/Framework/Interaction/Address.php index 602e67bc..a2d02b03 100644 --- a/Framework/Interaction/Address.php +++ b/Framework/Interaction/Address.php @@ -174,10 +174,11 @@ public function getAddress($data) * * @param \Magento\Customer\Api\Data\AddressInterface|\Magento\Quote\Api\Data\AddressInterface $address * @return \Magento\Framework\DataObject + * @throws LocalizedException */ public function convertCustomerAddressToAvaTaxAddress($address) { - $street = $address->getStreet(); + $street = $address->getStreet() ?? []; $data = [ 'line_1' => array_key_exists(0, $street) ? $street[0] : '',