This commit is contained in:
Kevin Wenger 2020-03-07 22:23:40 +00:00 committed by GitHub
commit 63e79c80be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,10 +8,17 @@ class GooglePlacesClient
{ {
$curl = curl_init(); $curl = curl_init();
$ssl_verifypeer = true;
// Remove ssl certificate verification for Windows
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN')
{
$ssl_verifypeer = false;
}
$options = array( $options = array(
CURLOPT_URL => $url, CURLOPT_URL => $url,
CURLOPT_HEADER => false, CURLOPT_HEADER => false,
CURLOPT_SSL_VERIFYPEER => true, CURLOPT_SSL_VERIFYPEER => $ssl_verifypeer,
CURLOPT_RETURNTRANSFER => true, CURLOPT_RETURNTRANSFER => true,
); );