You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If there is no configuration value in the database for payment/buckaroo_magento2_applepay/available_buttons an error will appear on the product page. TypeError: in_array(): Argument #2 ($haystack) must be of type array, bool given in Block/Catalog/Product/View/Applepay.php:66
Steps to reproduce:
Make sure there is no value for the configuration payment/buckaroo_magento2_applepay/available_buttons in the database
Go to a product page
An error is displayed
Cause of the issue:
It's because of the changes in commit 385f7d16924d37baec581e63934207cf2cf59844, file Block/Catalog/Product/View/Applepay.php, function canShowButton($page). Here the check $this->applepayConfigProvider->getAvailableButtons() has been removed. If there is no configuration value in the database, false is returned. However, an in_array() call is executed on this.
Solution:
Add the check again. See screenshot below.
Version:
Magento version 2.4.7-p3
Buckaroo version 1.50.2.
The text was updated successfully, but these errors were encountered:
If there is no configuration value in the database for
payment/buckaroo_magento2_applepay/available_buttons
an error will appear on the product page.TypeError: in_array(): Argument #2 ($haystack) must be of type array, bool given in Block/Catalog/Product/View/Applepay.php:66
Steps to reproduce:
payment/buckaroo_magento2_applepay/available_buttons
in the databaseCause of the issue:
It's because of the changes in commit
385f7d16924d37baec581e63934207cf2cf59844
, fileBlock/Catalog/Product/View/Applepay.php
, functioncanShowButton($page)
. Here the check$this->applepayConfigProvider->getAvailableButtons()
has been removed. If there is no configuration value in the database, false is returned. However, an in_array() call is executed on this.Solution:
Add the check again. See screenshot below.
Version:
The text was updated successfully, but these errors were encountered: