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)
594594 } else {
595595 $ defaultShipping = $ this ->customerRepository ->getById ($ customer ->getId ())->getDefaultShipping ();
596596 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+ }
598603 }
599604 }
600605 if (isset ($ shippingAddress )) {
@@ -623,7 +628,12 @@ protected function _prepareCustomerQuote($quote)
623628 } else {
624629 $ defaultBilling = $ this ->customerRepository ->getById ($ customer ->getId ())->getDefaultBilling ();
625630 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+ }
627637 }
628638 }
629639 if (isset ($ billingAddress )) {
You can’t perform that action at this time.
0 commit comments