From c64a21f47bcf464af601227b107210bcaae5ba70 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 26 Aug 2017 19:57:22 +0200 Subject: [PATCH] Fix regression in cleaning sql --- htdocs/core/lib/admin.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index 225786898be..b3a7129507b 100644 --- a/htdocs/core/lib/admin.lib.php +++ b/htdocs/core/lib/admin.lib.php @@ -189,7 +189,7 @@ function run_sql($sqlfile,$silent=1,$entity='',$usesavepoint=1,$handler='',$oker // Add line buf to buffer if not a comment if (! preg_match('/^--/',$buf)) { - $buf=preg_replace('/[,;]\s*--.*$/','',$buf); //remove comment from a line that not start with -- before add it to the buffer + $buf=preg_replace('/([,;])\s*--.*$/','\1',$buf); //remove comment from a line that not start with -- before add it to the buffer $buffer .= trim($buf); }