mollie / magento2-scandipwa

1 stars 3 forks source link

Issue on billing page #4

Closed Ylmzef closed 2 years ago

Ylmzef commented 2 years ago

I'm getting following issue when i enable Mollie backend extension with or without Mollie enabled from ScandiPWA package.json

Versions information: Magento 2.4.4 ScandiPWA 5.3.1 Mollie backend: 2.15.0 Mollie frontend: 1.0.1 PHP: 8.1 nginx: 1.20.2

main.ERROR: Deprecated Functionality: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/vhosts/xxx.xx/httpdocs/vendor/magento/module-payment/Gateway/Validator/CountryValidator.php on line 51

GraphQL (1:57)
1: mutation($addressInformation_1:SaveAddressInformation!){saveAddressInformation(addressInformation:$addressInformation_1){payment_methods{code,title,mollie_meta{image},mollie_available_issuers{name,code,image,svg}},totals{subtotal,tax_amount,base_grand_total,grand_total,discount_amount,shipping_amount,subtotal_incl_tax,shipping_incl_tax,quote_currency_code,shipping_tax_amount,subtotal_with_discount,shipping_discount_amount,items{qty,name,price,item_id,options,tax_amount,tax_percent,price_incl_tax,discount_amount,discount_percent}}}}
                                                           ^
 [] []
Frank-Magmodules commented 2 years ago

Hello @Ylmzef,

Looking at the specific line pointed out in the error (https://github.com/magento/magento2/blob/2.4.4/app/code/Magento/Payment/Gateway/Validator/CountryValidator.php#L51), it looks like you did enable the allowspecific option for a payment method, but didn’t select a specific (specificcountry) country. 

This returns null by default, but that gives an error in PHP 8.0 and higher. Changing these settings should help fix this error. From the provided context I can’t tell you for which payment method you need to change this though. As this error is caused by code on the Magento side, we are closing this issue, but feel free to reopen it if you need further assistance.

Ylmzef commented 2 years ago

Thanks it's fixed now!