Remove SSL Verify on Windows

Avoid error CURL Error: SSL certificate problem: unable to get local issuer certificate on windows whitout ssl
This commit is contained in:
Kevin Wenger 2015-06-11 17:38:57 +02:00
parent c72e2b06e1
commit 660b2ddcc2

View file

@ -17,6 +17,11 @@ class GooglePlacesClient
curl_setopt_array($curl, $options); curl_setopt_array($curl, $options);
// Add certificate for Windows
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
}
$response = curl_exec($curl); $response = curl_exec($curl);
if ($error = curl_error($curl)) if ($error = curl_error($curl))