From 99f0e545faf591372f044cbbab4a7ce5d5cc54df Mon Sep 17 00:00:00 2001 From: Jam Balaya Date: Thu, 13 Aug 2026 09:51:25 +0900 Subject: [PATCH] FIX: Remove always-true error checks in mysql dump export (backport of #39339 to 24.0) (#39444) --- htdocs/admin/tools/export.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/htdocs/admin/tools/export.php b/htdocs/admin/tools/export.php index 4450ac53ff3..80a8c64ffd9 100644 --- a/htdocs/admin/tools/export.php +++ b/htdocs/admin/tools/export.php @@ -143,17 +143,15 @@ if ($what == 'mysql') { } } - if (!$errormsg && $cmddump) { + if ($cmddump) { dolibarr_set_const($db, 'SYSTEMTOOLS_MYSQLDUMP', $cmddump, 'chaine', 0, '', 0); } - if (!$errormsg) { - $result = $utils->dumpDatabase(GETPOST('compression', 'alpha'), $what, 0, $file, 0, 0, $lowmemorydump); + $result = $utils->dumpDatabase(GETPOST('compression', 'alpha'), $what, 0, $file, 0, 0, $lowmemorydump); - $errormsg = $utils->error; - $_SESSION["commandbackuplastdone"] = $utils->result['commandbackuplastdone']; - $_SESSION["commandbackuptorun"] = $utils->result['commandbackuptorun']; - } + $errormsg = $utils->error; + $_SESSION["commandbackuplastdone"] = $utils->result['commandbackuplastdone']; + $_SESSION["commandbackuptorun"] = $utils->result['commandbackuptorun']; } // MYSQL NO BIN