Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getting warnings about array_key_exists() in php 7.4 #827

Closed
deckberg-quantumdigital opened this issue Jan 8, 2020 · 3 comments
Closed

Comments

@deckberg-quantumdigital
Copy link

I'm testing this out on PHP 7.4 and seeing a warning in my logs:

Warning: Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead in stripe/stripe-php/lib/ApiRequestor.php (402)

Maybe need to change line 402 to cast as an array?

FROM:
if (array_key_exists('request-id', $rheaders)) {

TO:
if (array_key_exists('request-id', (array) $rheaders)) {

@ob-stripe
Copy link
Contributor

This was fixed in #725 and released in stripe-php 7.0.0. Make sure you're using stripe-php 7.0.0 or a more recent version.

@deckberg-quantumdigital
Copy link
Author

oh shoot. you're right. had "stripe/stripe-php": "^6.4" in my composer.json

sorry about that.

guess I'll read through the migration guide. thanks for your time!

@ob-stripe
Copy link
Contributor

No problem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants