diff --git a/src/Processor/PayPalAddressProcessor.php b/src/Processor/PayPalAddressProcessor.php index defb813b..a8569f69 100644 --- a/src/Processor/PayPalAddressProcessor.php +++ b/src/Processor/PayPalAddressProcessor.php @@ -24,9 +24,13 @@ public function __construct(ObjectManager $objectManager) */ public function process(array $address, OrderInterface $order): void { - /** @var AddressInterface $orderAddress */ + /** @var ?AddressInterface $orderAddress */ $orderAddress = $order->getShippingAddress(); + if (null === $orderAddress) { + return; + } + Assert::keyExists($address, 'admin_area_2'); Assert::keyExists($address, 'address_line_1'); Assert::keyExists($address, 'postal_code');