From b167a4b4c5ea1fea66f1fdb0e112ab1eb9df7039 Mon Sep 17 00:00:00 2001 From: daniel Date: Mon, 18 Sep 2023 11:55:01 +0200 Subject: [PATCH] fix error report sql pandora_enterprise#12072 --- pandora_console/include/functions_db.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pandora_console/include/functions_db.php b/pandora_console/include/functions_db.php index e2091cc2c1..637257e764 100644 --- a/pandora_console/include/functions_db.php +++ b/pandora_console/include/functions_db.php @@ -2567,6 +2567,10 @@ function db_get_column_type(string $table, string $column='') */ function db_validate_sql(string $sql, $server=false) { + if ($server == 0) { + $server = false; + } + if ($server !== false && is_metaconsole() === true) { $setup = metaconsole_get_connection($server); if (metaconsole_connect($setup) !== NOERR) {