stripe-php icon indicating copy to clipboard operation
stripe-php copied to clipboard

Undefined variable $apiBase

Open cubicleWar opened this issue 12 years ago • 2 comments

If connection to stripe fails (which it currently does under hhvm all the time), an error will be given that $apiBase is undefined rather than the desired Exception being thrown.

$result = stream_socket_client($url, $errno, $errstr, 30, STREAM_CLIENT_CONNECT, $sslContext);

This can be fixed by adding the following at line 325 in ApiRequestor.php

$apiBase = Stripe::$apiBase;

cubicleWar avatar May 10 '14 09:05 cubicleWar

I am also having this issue.

EvanDarwin avatar Jun 01 '14 02:06 EvanDarwin

Fixed as part of 5c1191ee1e1a3c227bfbeef709f534777cd9d4fa (which also fixed HHVM so that this doesn't trigger).

bkrausz avatar Jun 22 '14 00:06 bkrausz