MultiSafepay / woocommerce

MultiSafepay WooCommerce plugin
https://docs.multisafepay.com/docs/woocommerce
10 stars 2 forks source link

Ideal::get_gateway_info() throws a fatal error if validation fails #12

Closed Stoux closed 3 years ago

Stoux commented 3 years ago

When the if statement in MultiSafepay\WooCommerce\PaymentMethods\PaymentMethods\Ideal::get_gateway_info() fails, no value is returned. This is invalid behaviour when using typed return values, as it is actually returning a null (which would make it : ?GatewayInfoInterface). https://github.com/MultiSafepay/WooCommerce/blob/master/src/PaymentMethods/PaymentMethods/Ideal.php#L110-L120

This causes a fatal error, stopping the script. See: https://sentry.io/share/issue/873f22ea26b342e6a29ffd6539a12310/ Please properly handle this case.

I've also addressed this in #LPY-974-90084.

Jasper-MultiSafepay commented 3 years ago

@Stoux Thanks for reporting, I'm seeing this invalid behaviour in multiple files. We'll resolve this and release an update.

Jasper-MultiSafepay commented 3 years ago

@Stoux We just released 4.1.4 which should fix your issue. Please let us know if this will solve your reported issue.