From 7d6c7998d83fb00ec914b736a7916ed39e429e36 Mon Sep 17 00:00:00 2001 From: Peter Knut Date: Tue, 8 Oct 2024 22:55:43 +0200 Subject: [PATCH] Editor: Fix array conversion to string (issue #3) --- editor/include/adminer.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/editor/include/adminer.inc.php b/editor/include/adminer.inc.php index 5856b717..4d6d68f3 100644 --- a/editor/include/adminer.inc.php +++ b/editor/include/adminer.inc.php @@ -353,10 +353,10 @@ ORDER BY ORDINAL_POSITION", null, "") as $row) { //! requires MySQL 5 $op = $where["op"]; $val = $where["val"]; - if (($key < 0 ? "" : $col) . $val != "") { - $conds = array(); + if (($key >= 0 && $col != "") || $val != "") { + $conds = []; - foreach (($col != "" ? array($col => $fields[$col]) : $fields) as $name => $field) { + foreach (($col != "" ? [$col => $fields[$col]] : $fields) as $name => $field) { if ($col != "" || is_numeric($val) || !preg_match(number_type(), $field["type"])) { $name = idf_escape($name);