Skip to content

Commit d23cd41

Browse files
fix(PrestashopWebServiceLibrary): wrong value for CURLOPT_SSL_VERIFYHOST in non local env
1 parent 25d264d commit d23cd41

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/PrestashopWebServiceLibrary.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ protected function executeRequest($url, $curl_params = array())
134134
CURLOPT_HTTPAUTH => CURLAUTH_BASIC,
135135
CURLOPT_USERPWD => $this->key.':',
136136
CURLOPT_HTTPHEADER => array( 'Expect:' ),
137-
CURLOPT_SSL_VERIFYPEER => !(env('APP_ENV') === 'local'),
138-
CURLOPT_SSL_VERIFYHOST => !(env('APP_ENV') === 'local')
137+
CURLOPT_SSL_VERIFYPEER => config('app.env') === 'local' ? 0 : 1,
138+
CURLOPT_SSL_VERIFYHOST => config('app.env') === 'local' ? 0 : 2 // value 1 is not accepted https://curl.haxx.se/libcurl/c/CURLOPT_SSL_VERIFYHOST.html
139139
);
140140

141141
$curl_options = array();

0 commit comments

Comments
 (0)