From 629af89986d0bd5d5dc1ab317b5b08710534e3b2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 22 Oct 2016 16:18:28 +0200 Subject: [PATCH] FIX Solve backup when using mysqldump that return warning --- build/debian/copyright | 2 +- htdocs/core/class/utils.class.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/build/debian/copyright b/build/debian/copyright index e568996551e..c0733bb5374 100644 --- a/build/debian/copyright +++ b/build/debian/copyright @@ -1,7 +1,7 @@ Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: Dolibarr Upstream-Contact: Laurent Destailleur -Source: http://www.dolibarr.org/files/stable/standard/ +Source: https://www.dolibarr.org/files/stable/standard/ Files: * Copyright: 2002-2009, Rodolphe Quiedeville diff --git a/htdocs/core/class/utils.class.php b/htdocs/core/class/utils.class.php index 2724d64f17f..e244c2f2f8c 100644 --- a/htdocs/core/class/utils.class.php +++ b/htdocs/core/class/utils.class.php @@ -268,7 +268,8 @@ class Utils { $i++; // output line number $read = fgets($handlein); - if ($i == 1 && preg_match('/'.preg_quote('Warning: Using a password').'/i', $read)) continue; + // Exclude warning line we don't want + if ($i == 1 && preg_match('/'.preg_quote('Warning\*Using a password').'/i', $read)) continue; fwrite($handle,$read); if (preg_match('/'.preg_quote('-- Dump completed').'/i',$read)) $ok=1; elseif (preg_match('/'.preg_quote('SET SQL_NOTES=@OLD_SQL_NOTES').'/i',$read)) $ok=1;