forked from LiveCarta/PayPal-PHP-SDK
Update PayPalHttpConfig.php
To prefent :
ErrorException in PayPalHttpConfig.php line 67: substr_compare():
The start position cannot exceed initial string length
Add the extra check on line 67 to check if SSLversion is something. Since Google App Engine does not support CURL this check prevents the application of crashing
This commit is contained in:
committed by
GitHub
parent
b67913d0e5
commit
b51c07d6db
@@ -64,7 +64,7 @@ class PayPalHttpConfig
|
|||||||
// Update the Cipher List based on OpenSSL or NSS settings
|
// Update the Cipher List based on OpenSSL or NSS settings
|
||||||
$curl = curl_version();
|
$curl = curl_version();
|
||||||
$sslVersion = isset($curl['ssl_version']) ? $curl['ssl_version'] : '';
|
$sslVersion = isset($curl['ssl_version']) ? $curl['ssl_version'] : '';
|
||||||
if (substr_compare($sslVersion, "NSS/", 0, strlen("NSS/")) === 0) {
|
if($sslVersion && substr_compare($sslVersion, "NSS/", 0, strlen("NSS/")) === 0) {
|
||||||
//Remove the Cipher List for NSS
|
//Remove the Cipher List for NSS
|
||||||
$this->removeCurlOption(CURLOPT_SSL_CIPHER_LIST);
|
$this->removeCurlOption(CURLOPT_SSL_CIPHER_LIST);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user