Closed bleepsandblops closed 1 year ago
We're getting this error message with an address from Singapore [TypeError] JouwWeb\SendCloud\Model\Address::__construct(): Argument #5 ($city) must be of type string, null given
[TypeError] JouwWeb\SendCloud\Model\Address::__construct(): Argument #5 ($city) must be of type string, null given
Singapore addresses do not have a city, it's just "Singapore".
My quick fix was this: https://github.com/white-nl/commerce-sendcloud/blob/51f2e693ea472e8c08cbb9bceabe8a37c85e8154/src/client/JouwWebSendcloudAdapter.php#L248 but it could be cleaner (sending the country name), or something else, like sending the state if it exists, then the country.
1. 2.
Hi @bleepsandblops, I'll try to push a fix for this today
3.0.0 is now released with the fix. Thank you for your patience.
Description
We're getting this error message with an address from Singapore
[TypeError] JouwWeb\SendCloud\Model\Address::__construct(): Argument #5 ($city) must be of type string, null given
Singapore addresses do not have a city, it's just "Singapore".
My quick fix was this: https://github.com/white-nl/commerce-sendcloud/blob/51f2e693ea472e8c08cbb9bceabe8a37c85e8154/src/client/JouwWebSendcloudAdapter.php#L248 but it could be cleaner (sending the country name), or something else, like sending the state if it exists, then the country.
Steps to reproduce
1. 2.
Additional info