From: Peter Knut Date: Sun, 25 Aug 2024 20:14:35 +0000 (+0200) Subject: Fix field selection in Elasticsearch X-Git-Tag: v4.16.0~110 X-Git-Url: https://git.joonet.de/?a=commitdiff_plain;h=ac9fd04f87d13fcd75d3a3e6b87d8b2fcc5db091;p=adminer.git Fix field selection in Elasticsearch Thanks to cweiske: https://github.com/adminerevo/adminerevo/pull/159 --- diff --git a/plugins/drivers/elastic.php b/plugins/drivers/elastic.php index 8d450ad0..cf4b17f2 100644 --- a/plugins/drivers/elastic.php +++ b/plugins/drivers/elastic.php @@ -133,7 +133,7 @@ if (isset($_GET["elastic"])) { function select($table, $select, $where, $group, $order = array(), $limit = 1, $page = 0, $print = false) { $data = array(); if ($select != array("*")) { - $data["fields"] = $select; + $data["fields"] = array_values($select); } if ($order) { diff --git a/plugins/drivers/elastic5.php b/plugins/drivers/elastic5.php index 62283226..1ad0cb27 100644 --- a/plugins/drivers/elastic5.php +++ b/plugins/drivers/elastic5.php @@ -121,7 +121,7 @@ if (isset($_GET["elastic5"])) { function select($table, $select, $where, $group, $order = array(), $limit = 1, $page = 0, $print = false) { $data = array(); if ($select != array("*")) { - $data["fields"] = $select; + $data["fields"] = array_values($select); } if ($order) {