File tree 1 file changed +3
-3
lines changed
app/code/Magento/Persistent/Observer
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ public function execute(\Magento\Framework\Event\Observer $observer)
87
87
/** @var \Magento\Customer\Api\Data\CustomerInterface $customer */
88
88
$ customer = $ this ->customerRepository ->getById ($ this ->_persistentSession ->getSession ()->getCustomerId ());
89
89
if ($ defaultShipping = $ customer ->getDefaultShipping ()) {
90
- $ address = $ this ->getCustomerAddressById ($ defaultShipping );
90
+ $ address = $ this ->getCustomerAddressById (( int ) $ defaultShipping );
91
91
92
92
if ($ address !== null ) {
93
93
$ this ->_customerSession ->setDefaultTaxShippingAddress (
@@ -103,7 +103,7 @@ public function execute(\Magento\Framework\Event\Observer $observer)
103
103
}
104
104
105
105
if ($ defaultBilling = $ customer ->getDefaultBilling ()) {
106
- $ address = $ this ->getCustomerAddressById ($ defaultBilling );
106
+ $ address = $ this ->getCustomerAddressById (( int ) $ defaultBilling );
107
107
108
108
if ($ address !== null ) {
109
109
$ this ->_customerSession ->setDefaultTaxBillingAddress ([
@@ -127,7 +127,7 @@ public function execute(\Magento\Framework\Event\Observer $observer)
127
127
* @param int $addressId
128
128
* @return \Magento\Customer\Api\Data\AddressInterface|null
129
129
*/
130
- private function getCustomerAddressById ($ addressId )
130
+ private function getCustomerAddressById (int $ addressId )
131
131
{
132
132
try {
133
133
return $ this ->addressRepository ->getById ($ addressId );
You can’t perform that action at this time.
0 commit comments