From 87acdd10c797f4f8f08d78b8fe51532aaa9c0126 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 3 Aug 2008 11:37:40 +0000 Subject: [PATCH] Fix: Error management for failed dump was not working --- htdocs/admin/tools/export.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/htdocs/admin/tools/export.php b/htdocs/admin/tools/export.php index 2ccd9f3da39..6ec948f63e4 100644 --- a/htdocs/admin/tools/export.php +++ b/htdocs/admin/tools/export.php @@ -176,15 +176,13 @@ if ($what == 'mysql') dolibarr_syslog("Failed to open file $outputfile",LOG_ERR); $errormsg=$langs->trans("ErrorFailedToWriteInDir"); } - // Get errorstring if ($compression == 'none') $handle = fopen($outputfile, 'r'); if ($compression == 'gz') $handle = gzopen($outputfile, 'r'); if ($compression == 'bz') $handle = bzopen($outputfile, 'r'); - if ($hanlde) + if ($handle) { -print 'eeee'; - $errormsg = fgets($handle,10); + $errormsg = fgets($handle,1024); if ($compression == 'none') fclose($handle); if ($compression == 'gz') gzclose($handle); if ($compression == 'bz') bzclose($handle);