Skip to content

Commit

Permalink
bug #158 Check order has a shipping address in the PayPalAddressProce…
Browse files Browse the repository at this point in the history
…ssor (jdeveloper)

This PR was merged into the 1.0-dev branch.

Discussion
----------

Fixes #157 

Commits
-------

c4fef3f Check order has a shipping address in the PayPalAddressProcessor
053adf0 Use strict comparsion
  • Loading branch information
Zales0123 authored Nov 12, 2020
2 parents e42eea2 + 053adf0 commit 8514115
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Processor/PayPalAddressProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 8514115

Please sign in to comment.