Skip to content

Commit 09f41b4

Browse files
committed
After changing CURLOPT_RETURN_TRANSFER to getting response with ob_ functions, response will never be false (empty string instead) cause of this exceptions will never throw.
1 parent 795ebe1 commit 09f41b4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/ElasticSearch/Transport/HTTP.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ protected function call($url, $method="GET", $payload=null) {
204204
ob_start();
205205
curl_exec($conn);
206206
$response = ob_get_clean();
207-
if ($response !== false) {
207+
if (!empty($response)) {
208208
$data = json_decode($response, true);
209209
if (!$data) {
210210
$data = array('error' => $response, "code" => curl_getinfo($conn, CURLINFO_HTTP_CODE));

0 commit comments

Comments
 (0)