BP-3894 Apple Pay button issue on product page #1102
Labels
Bug
Bugs, functions that are not working like they should.
Priority: Normal
This issue has a normal/medium priority.
Status: Released
A fix is included in a release already.
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: