Skip to content

Commit 5ae2128

Browse files
committed
Accommodate curl_exec returning false. Thanks to @mrden for the bug report.
1 parent 7c944e3 commit 5ae2128

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

restclient.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,9 @@ public function execute(string $url, string $method='GET', $parameters=[], array
201201
}
202202
curl_setopt_array($client->handle, $curlopt);
203203

204-
$client->parse_response(curl_exec($client->handle));
204+
$response = curl_exec($client->handle);
205+
if($response !== FALSE)
206+
$client->parse_response($response);
205207
$client->info = (object) curl_getinfo($client->handle);
206208
$client->error = curl_error($client->handle);
207209

0 commit comments

Comments
 (0)