We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9a32d6a commit 6e0fb96Copy full SHA for 6e0fb96
src/Manager/ElasticsearchPipelineManager.php
@@ -42,13 +42,15 @@ public function getAll(): array
42
$results = $callResponse->getContent();
43
44
$pipelines = [];
45
- foreach ($results as $k => $row) {
46
- $row['name'] = $k;
47
- $pipelineModel = new ElasticsearchPipelineModel();
48
- $pipelineModel->convert($row);
49
- $pipelines[] = $pipelineModel;
+ if ($results) {
+ foreach ($results as $k => $row) {
+ $row['name'] = $k;
+ $pipelineModel = new ElasticsearchPipelineModel();
+ $pipelineModel->convert($row);
50
+ $pipelines[] = $pipelineModel;
51
+ }
52
+ usort($pipelines, [$this, 'sortByName']);
53
}
- usort($pipelines, [$this, 'sortByName']);
54
55
return $pipelines;
56
0 commit comments