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

7.4 Issue With Array Key Exist #814

Closed
ProdigyView opened this issue Dec 3, 2019 · 2 comments
Closed

7.4 Issue With Array Key Exist #814

ProdigyView opened this issue Dec 3, 2019 · 2 comments
Assignees

Comments

@ProdigyView
Copy link

Found this while running unit tests:

array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead

/code/vendor/stripe/stripe-php/lib/ApiRequestor.php:402
/code/vendor/stripe/stripe-php/lib/ApiRequestor.php:125
/code/vendor/stripe/stripe-php/lib/ApiOperations/Request.php:57
/code/vendor/stripe/stripe-php/lib/ApiOperations/Create.php:23

The code that produces the bug is:

if (array_key_exists('request-id', $rheaders)) {
            self::$requestTelemetry = new RequestTelemetry(
                $rheaders['request-id'],
                Util\Util::currentTimeMillis() - $requestStartMs
            );
        }

I;m unsure if $rheaders should be an object or array.

@ob-stripe
Copy link
Contributor

@ProdigyView Thanks for the report! This was already fixed in #725 and released in stripe-php 7.0.0.

@ob-stripe ob-stripe mentioned this issue Dec 17, 2019
@fabswt
Copy link

fabswt commented Apr 7, 2020

FYI, getting this error in v6.43.1:

array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead
File: /var/www/html/clickandspeak/vendor/stripe/stripe-php/lib/ApiRequestor.php
Line: 402

Was not getting the error with v5.9.2.
OK in 7.28.0.

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

3 participants