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:
Victor Angelier CCX
2016-11-05 14:56:57 +01:00
committed by GitHub
parent b67913d0e5
commit b51c07d6db

View File

@@ -64,7 +64,7 @@ class PayPalHttpConfig
// Update the Cipher List based on OpenSSL or NSS settings
$curl = curl_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
$this->removeCurlOption(CURLOPT_SSL_CIPHER_LIST);
}