From 392f8af7b68f59824f71ab026c81274389ad7194 Mon Sep 17 00:00:00 2001 From: Richard Marmorstein Date: Thu, 9 Jan 2020 11:43:38 -0500 Subject: [PATCH] Don't call php_uname function if disabled by php.ini --- lib/ApiRequestor.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ApiRequestor.php b/lib/ApiRequestor.php index 80e28f077..022d9c599 100644 --- a/lib/ApiRequestor.php +++ b/lib/ApiRequestor.php @@ -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 = [