mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-09 01:12:33 +01:00
FIX mysql error during dump for enable sandbox M999999 (#31116)
This commit is contained in:
committed by
GitHub
parent
6de574bf5c
commit
e4a93da82e
@@ -532,13 +532,13 @@ class Utils
|
||||
} elseif ($compression == 'zstd') {
|
||||
fclose($handle);
|
||||
}
|
||||
if ($ok && preg_match('/^-- (MySql|MariaDB)/i', $errormsg)) { // No error
|
||||
if ($ok && preg_match('/^-- (MySql|MariaDB)/i', $errormsg) || preg_match('/^\/\*M?!999999/', $errormsg)) { // Start of file is ok, NOT an error
|
||||
$errormsg = '';
|
||||
} else {
|
||||
// Renommer fichier sortie en fichier erreur
|
||||
// Rename file out into a file error
|
||||
//print "$outputfile -> $outputerror";
|
||||
@dol_delete_file($outputerror, 1, 0, 0, null, false, 0);
|
||||
@rename($outputfile, $outputerror);
|
||||
@dol_move($outputfile, $outputerror, '0', 1, 0, 0);
|
||||
// Si safe_mode on et command hors du parametre exec, on a un fichier out vide donc errormsg vide
|
||||
if (!$errormsg) {
|
||||
$langs->load("errors");
|
||||
|
||||
Reference in New Issue
Block a user