chargebee / chargebee-php

PHP library for the Chargebee API.

Home Page:https://apidocs.chargebee.com/docs/api?lang=php

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Php Version Issue

zachgarcia1 opened this issue · comments

Getting an error of

Use of undefined constant s - assumed 's' (this will throw an Error in a future version of PHP)

From

chargebee/chargebee-php/lib/ChargeBee/Curl.php

seems to be coming from line 41 which is

array_push($httpHeaders, 'Accept: application/json', "User-Agent: " . $userAgent , "Lang-Version: " . phpversion() , "OS-Version: " . php_uname(s). " " . php_uname(m) . " " . php_uname(r)); // Adding headers to array

My current version of php is 7.3
screen shot 2019-03-08 at 8 16 10 am

4a85ddf#diff-aeb4637f48ebc9843f1a666c84ad782d

Seems to have been affected by this commit.

@zachgarcia1
We will fix this ASAP . Please use the previous php version 2.6.0 until then .
Thanks.

confirmed working on 2.6.0 will set composer file to reflect changes and will check back for the update. Thank you for your quick response.

Thanks for quickly publishing a fixed 2.6.2 version.
However, it's not available on Packagist yet. Could you publish it?
https://packagist.org/packages/chargebee/chargebee-php

@gitomato Published in Packagist. Thanks.

thank you for the update. confirmed working on latest version.