impress-org / givewp

GiveWP - The #1 Donation Plugin for WordPress. Easily accept donations and fundraise using your WordPress website.
https://givewp.com/
GNU General Public License v3.0
345 stars 191 forks source link

Unable to connect to Stripe using PHP 8 #5873

Closed canny[bot] closed 3 years ago

canny[bot] commented 3 years ago

Details

Trying to connect to Stripe using PHP 8 generates a fatal error.

PHP Fatal error: Uncaught TypeError: array_key_exists(): Argument #2 ($array) must be of type array, Stripe\Util\CaseInsensitiveArray given in /Users/daro/Local Sites/nirmalavidya/app/public/wp-content/plugins/give/vendor/stripe/stripe-php/lib/ApiRequestor.php:402

Expected Behavior

Connect to Stripe should work on PHP8.

Steps to Reproduce

  1. Enable WP_DEBUG
  2. Install GiveWP on a server that runs PHP8
  3. Try to connect Stripe account
  4. Check the error log

Acceptance Criteria

canny[bot] commented 3 years ago

This issue has been linked to a Canny post: Unable to connect to Stripe using PHP 8 :tada:

JasonTheAdams commented 3 years ago

@alaca What's the status of this? Was this resolved in the PHP 8 PRs? Or is this something else?

alaca commented 3 years ago

@JasonTheAdams I think this issue is related to this one https://github.com/stripe/stripe-php/issues/814 and it is resolved in this release https://github.com/stripe/stripe-php/releases/tag/v7.0.0

Currently, we are using v6.43.1.

JasonTheAdams commented 3 years ago

@alaca When you get a chance, can you please make a PR and test that out?