Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Mollie outage disabled our store due to ungraceful failure #213

Closed
loekvangool opened this issue Nov 17, 2021 · 1 comment
Closed

The Mollie outage disabled our store due to ungraceful failure #213

loekvangool opened this issue Nov 17, 2021 · 1 comment

Comments

@loekvangool
Copy link

loekvangool commented Nov 17, 2021

The Mollie outage this morning lead to a fatal error in our cart, effectively closing our store:

Warning: array_column() expects parameter 1 to be array, bool given  in [...]/app/code/community/Mollie/Mpm/Helper/Data.php on line 731

Cause: https://github.com/mollie/Magento/blob/master/app/code/community/Mollie/Mpm/Helper/Data.php#L731

This can be made to fail gracefully. Something like:

$availableMethodsArray = json_decode(json_encode($availableMethods), true);
if (is_array($availableMethodsArray) === false) {
  return false;
}
$available = array_search($methodCode, array_column($availableMethodsArray, 'id'));
if ($available === false) {
  return false;
}

Maybe it would be a good idea to check the module for assumptions about other external calls as well, at least in the customer order flow.

michielgerritsen added a commit to michielgerritsen/mollie-magento1 that referenced this issue Jun 13, 2022
@Frank-Magmodules
Copy link
Contributor

HI @loekvangool ,

Quite a late response! But happy to share we've just released a new version with a fix for this issue.
Have a great day!

michielgerritsen added a commit to michielgerritsen/mollie-magento1 that referenced this issue Feb 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants