From 8f932b470b52ca3db143a649cf6ad1398475ed10 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 3 Aug 2008 19:43:02 +0000 Subject: [PATCH] Fix: Error management for failed dump was not working --- htdocs/admin/tools/export.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/admin/tools/export.php b/htdocs/admin/tools/export.php index 6ec948f63e4..25e9f380179 100644 --- a/htdocs/admin/tools/export.php +++ b/htdocs/admin/tools/export.php @@ -182,7 +182,7 @@ if ($what == 'mysql') if ($compression == 'bz') $handle = bzopen($outputfile, 'r'); if ($handle) { - $errormsg = fgets($handle,1024); + $errormsg = fgets($handle,2048); // Get 2048 first chars of error message. if ($compression == 'none') fclose($handle); if ($compression == 'gz') gzclose($handle); if ($compression == 'bz') bzclose($handle); @@ -193,7 +193,7 @@ if ($what == 'mysql') //print "$outputfile -> $outputerror"; dol_delete_file($outputerror); @rename($outputfile,$outputerror); - // Si safe_mode on et command hors du parametre exec, on a un fichier out donc errormsg vide + // Si safe_mode on et command hors du parametre exec, on a un fichier out vide donc errormsg vide if (! $errormsg) $errormsg=$langs->trans("ErrorFailedToRunExternalCommand"); } }