From b51c07d6db48feb3be0d8285c56eb3b761f56ac2 Mon Sep 17 00:00:00 2001 From: Victor Angelier CCX Date: Sat, 5 Nov 2016 14:56:57 +0100 Subject: [PATCH] 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 --- lib/PayPal/Core/PayPalHttpConfig.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PayPal/Core/PayPalHttpConfig.php b/lib/PayPal/Core/PayPalHttpConfig.php index 8a2b2a3..0afabc3 100644 --- a/lib/PayPal/Core/PayPalHttpConfig.php +++ b/lib/PayPal/Core/PayPalHttpConfig.php @@ -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); }