From d9a85e6d3b26774a8501faed2445e092a2a28181 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 26 Aug 2017 19:19:23 +0200 Subject: [PATCH] FIX Install run_sql function accept -- into sql content. --- 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 e74d1b1e94f..225786898be 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('/--.*$/','',$buf); //remove comment from a line that not start with -- before add it to the buffer + $buf=preg_replace('/[,;]\s*--.*$/','',$buf); //remove comment from a line that not start with -- before add it to the buffer $buffer .= trim($buf); }