Skip to content

Commit

Permalink
Merge pull request #829 from stripe/richardm-dont-call-phpuname-if-di…
Browse files Browse the repository at this point in the history
…sabled

Don't call php_uname function if disabled by php.ini
  • Loading branch information
richardm-stripe committed Jan 13, 2020
2 parents b7e86a8 + 392f8af commit 5230037
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/ApiRequestor.php
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,8 @@ private static function _defaultHeaders($apiKey, $clientInfo = null)
$uaString = 'Stripe/v1 PhpBindings/' . Stripe::VERSION;

$langVersion = phpversion();
$uname = php_uname();
$uname_disabled = in_array('php_uname', explode(',', ini_get('disable_functions')));
$uname = $uname_disabled ? '(disabled)' : php_uname();

$appInfo = Stripe::getAppInfo();
$ua = [
Expand Down

0 comments on commit 5230037

Please sign in to comment.