concretecms-community-store / community_store

An open, free and community developed eCommerce system for Concrete CMS
https://concretecms-community-store.github.io/community_store/
MIT License
106 stars 66 forks source link

$addressData must be of type array, null given #845

Closed mlocati closed 4 months ago

mlocati commented 4 months ago

Stack trace:

File: [webroot]/concrete/src/Localization/Service/AddressFormat.php
Line: 94

Trace: #0 [webroot]/packages/community_store/src/CommunityStore/Customer/Customer.php(236): Concrete\Core\Localization\Service\AddressFormat->format()
#1 [webroot]/packages/community_store/src/CommunityStore/Customer/Customer.php(192): Concrete\Package\CommunityStore\Src\CommunityStore\Customer\Customer::formatAddress()
#2 [webroot]/packages/community_store/single_pages/checkout.php(254): Concrete\Package\CommunityStore\Src\CommunityStore\Customer\Customer->getAddress()

I guess this is caused by 7d119c112839dada9285c80996d4ebd5a443de98

Mesuva commented 4 months ago

I had a feeling this would pop up - there are times we pass formatting the address as just an array of fields (when it's a guest customer), and others when we pass it the object from address attribute (when it's an order or a logged in customer).

Will chase this one down.