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

PHP Parse error: syntax error, unexpected '*' in /vendor/stripe/stripe-php/lib/HttpClient/CurlClient.php on line 461" #919

Closed
discry opened this issue Apr 20, 2020 · 3 comments

Comments

@discry
Copy link

discry commented Apr 20, 2020

I believe that I have identified a bug in CurlClient which looks like bad syntax:

The above error was happening for me on the newest version of the library

7.28.1 - 2020-04-10

  • #915 Improve PHPdocs for many classes
    Error in new code:
$sleepSeconds = \min(
    Stripe::getInitialNetworkRetryDelay() * 1.0 * 2 ** ($numRetries - 1),
    Stripe::getMaxNetworkRetryDelay()
);

Working code in older version (6.4.2):

$sleepSeconds = min(
    Stripe::getInitialNetworkRetryDelay() * 1.0 * pow(2, $numRetries - 1),
    Stripe::getMaxNetworkRetryDelay()
);

Please only file issues here that you believe represent actual bugs or feature requests for the Stripe PHP library.

If you're having general trouble with your Stripe integration, please reach out to support using the form at https://support.stripe.com/ (preferred) or via email to [email protected].

If you are reporting a bug, please include your PHP version and the version of the Stripe PHP library you're using, as well as any other details that may be helpful in reproducing the problem.

@ob-stripe
Copy link
Contributor

@discry Which version of PHP are you using?

@jfuentesa
Copy link

You are using PHP 5.5 or below, the operator ** was introduced on PHP 5.6

@ob-stripe
Copy link
Contributor

Yes, this is almost certainly what's happening. As of v7.0.0, stripe-php requires PHP 5.6 or more recent.

Closing, but feel free to reply.

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