elasticsearch-php
elasticsearch-php copied to clipboard
Strpos on null, need better graceful handling in the event the $responseBody is null
trafficstars
https://github.com/elastic/elasticsearch-php/blob/3df6517a32d5521f094a14a3d908b920799a597a/src/Elasticsearch/Connections/Connection.php#L719
@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.
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: ->},
--
Thanks @mohammed-adil-moughal - this helps us prioritise :)