From ece84e975d0b709498faa3f09c37dea7d95ea693 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@users.sourceforge.net> Date: Mon, 8 Feb 2010 14:20:09 +0000 Subject: [PATCH] Fix: Error on close --- htdocs/admin/tools/export.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/admin/tools/export.php b/htdocs/admin/tools/export.php index fdbadb63749..696a28e2263 100644 --- a/htdocs/admin/tools/export.php +++ b/htdocs/admin/tools/export.php @@ -1,5 +1,5 @@ <?php -/* Copyright (C) 2006-2009 Laurent Destailleur <eldy@users.sourceforge.net> +/* Copyright (C) 2006-2010 Laurent Destailleur <eldy@users.sourceforge.net> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -186,7 +186,9 @@ if ($what == 'mysql') if ($compression == 'bz') $handle = bzopen($outputfile, 'r'); if ($handle) { - $errormsg = fgets($handle,2048); // Get 2048 first chars of error message. + // Get 2048 first chars of error message. + $errormsg = fgets($handle,2048); + // Close file if ($compression == 'none') fclose($handle); if ($compression == 'gz') gzclose($handle); if ($compression == 'bz') bzclose($handle); @@ -201,7 +203,6 @@ if ($what == 'mysql') if (! $errormsg) $errormsg=$langs->trans("ErrorFailedToRunExternalCommand"); } } - fclose($handle); // Fin execution commande } -- GitLab