elasticsearch-php icon indicating copy to clipboard operation
elasticsearch-php copied to clipboard

Strpos on null, need better graceful handling in the event the $responseBody is null

Open mohammed-adil-moughal opened this issue 3 years ago • 3 comments
trafficstars

https://github.com/elastic/elasticsearch-php/blob/3df6517a32d5521f094a14a3d908b920799a597a/src/Elasticsearch/Connections/Connection.php#L719

mohammed-adil-moughal avatar Dec 07 '21 15:12 mohammed-adil-moughal

@mohammed-adil-moughal Have you seen a null $responseBody in the wild, or is this a hypothetical problem? If so, could you provide details of the code which generates such a failure, so that we can test and reproduce? Thanks.

technige avatar Jan 20 '22 10:01 technige

Hey @technige yeah i encountered it sometime when had some failures on aws hope this helps



[{file: /var/www/project/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php, function: strpos, line: 658}, {class: Elasticsearch\Connections\Connection, file: /var/www/project/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php, function: process5xxError, line: 320, type: ->}, {class: Elasticsearch\Connections\Connection, file: /var/www/project/vendor/react/promise/src/FulfilledPromise.php, function: Elasticsearch\Connections\{closure}, line: 28, type: ->},
--



mohammed-adil-moughal avatar Jan 20 '22 10:01 mohammed-adil-moughal

Thanks @mohammed-adil-moughal - this helps us prioritise :)

technige avatar Jan 24 '22 08:01 technige