Skip to content

Commit 8e9035c

Browse files
committed
Merge pull request #1097 from ihor-sviziev/patch-1
Customer model - getPrimaryAddresses without primary billing address - Fix
2 parents 48c391b + a2ed136 commit 8e9035c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/code/Magento/Customer/Model/Customer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,7 @@ public function getPrimaryAddresses()
725725

726726
$primaryShipping = $this->getPrimaryShippingAddress();
727727
if ($primaryShipping) {
728-
if ($primaryBilling->getId() == $primaryShipping->getId()) {
728+
if ($primaryBilling && $primaryBilling->getId() == $primaryShipping->getId()) {
729729
$primaryBilling->setIsPrimaryShipping(true);
730730
} else {
731731
$primaryShipping->setIsPrimaryShipping(true);

0 commit comments

Comments
 (0)