From 02fc420c2ab3abb411f645773ea9b29141370877 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 14 Jan 2022 11:37:13 +0100 Subject: [PATCH] FIX #19817 --- htdocs/core/lib/admin.lib.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index 8e1e447ee53..448677002df 100644 --- a/htdocs/core/lib/admin.lib.php +++ b/htdocs/core/lib/admin.lib.php @@ -240,6 +240,7 @@ function run_sql($sqlfile, $silent = 1, $entity = '', $usesavepoint = 1, $handle if (empty($nocommentremoval)) { $buf = preg_replace('/([,;ERLT\)])\s*--.*$/i', '\1', $buf); //remove comment from a line that not start with -- before add it to the buffer } + if ($buffer) $buffer .= ' '; $buffer .= trim($buf); }