File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
app/code/Magento/Quote/Model Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -594,7 +594,12 @@ protected function _prepareCustomerQuote($quote)
594
594
} else {
595
595
$ defaultShipping = $ this ->customerRepository ->getById ($ customer ->getId ())->getDefaultShipping ();
596
596
if ($ defaultShipping ) {
597
- $ shippingAddress = $ this ->addressRepository ->getById ($ defaultShipping );
597
+ try {
598
+ $ shippingAddress = $ this ->addressRepository ->getById ($ defaultShipping );
599
+ // phpcs:ignore Magento2.CodeAnalysis.EmptyBlock
600
+ } catch (LocalizedException $ e ) {
601
+ // no address
602
+ }
598
603
}
599
604
}
600
605
if (isset ($ shippingAddress )) {
@@ -623,7 +628,12 @@ protected function _prepareCustomerQuote($quote)
623
628
} else {
624
629
$ defaultBilling = $ this ->customerRepository ->getById ($ customer ->getId ())->getDefaultBilling ();
625
630
if ($ defaultBilling ) {
626
- $ billingAddress = $ this ->addressRepository ->getById ($ defaultBilling );
631
+ try {
632
+ $ billingAddress = $ this ->addressRepository ->getById ($ defaultBilling );
633
+ // phpcs:ignore Magento2.CodeAnalysis.EmptyBlock
634
+ } catch (LocalizedException $ e ) {
635
+ // no address
636
+ }
627
637
}
628
638
}
629
639
if (isset ($ billingAddress )) {
You can’t perform that action at this time.
0 commit comments