Skip to content

Commit

Permalink
fix: handle empty card brands configuration #357
Browse files Browse the repository at this point in the history
handle empty card brands configuration
  • Loading branch information
fabiano-mallmann authored Aug 21, 2024
2 parents 03968b8 + 0fa08fa commit 376bbd9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Gateway/Transaction/GooglePay/Config/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function getMerchantName()
public function getCardBrands()
{
$brandsAllowed = [];
$creditCardBrandsSelected = explode(',', $this->getConfig(static::CARD_BRANDS));
$creditCardBrandsSelected = explode(',', $this->getConfig(static::CARD_BRANDS) ?? '');
foreach ($creditCardBrandsSelected as $brand) {
if (in_array(strtoupper($brand), static::GOOGLE_POSSIBLE_BRANDS)) {
$brandsAllowed[] = strtoupper($brand);
Expand Down

0 comments on commit 376bbd9

Please sign in to comment.