Skip to content

Commit

Permalink
Don't call php_uname function if disabled by php.ini
Browse files Browse the repository at this point in the history
  • Loading branch information
richardm-stripe committed Jan 9, 2020
1 parent b7e86a8 commit 392f8af
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 392f8af

Please sign in to comment.