braintree / braintree_php

Braintree PHP library
https://developer.paypal.com/braintree/docs/start/overview
MIT License
547 stars 224 forks source link

TypeError(code: 0): count(): Argument #1 ($value) must be of type Countable|array, bool given at vendor/braintree/braintree_php/lib/Braintree/CreditCard.php:126 #341

Closed slisenko closed 4 months ago

slisenko commented 4 months ago

General information

Issue description

(TypeError(code: 0): count(): Argument #1 ($value) must be of type Countable|array, bool given at vendor/braintree/braintree_php/lib/Braintree/CreditCard.php:126

Code looks like if (isset($creditCardAttribs['verifications']) && count($creditCardAttribs['verifications']) > 0) but seems sometimes it returns as a boolean.