chargebee / chargebee-php

PHP library for the Chargebee API.
https://apidocs.chargebee.com/docs/api?lang=php
MIT License
72 stars 62 forks source link

Php Version Issue #25

Closed zachgarcia1 closed 5 years ago

zachgarcia1 commented 5 years ago

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

zachgarcia1 commented 5 years ago

https://github.com/chargebee/chargebee-php/commit/4a85ddff5eec3fc82ee5c9e1d1133658a1209efc#diff-aeb4637f48ebc9843f1a666c84ad782d

Seems to have been affected by this commit.

cb-goutham commented 5 years ago

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

zachgarcia1 commented 5 years ago

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.

gitomato commented 5 years ago

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

SangeethaBaskaran commented 5 years ago

@gitomato Published in Packagist. Thanks.

zachgarcia1 commented 5 years ago

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