From 970465862cddf5a5483282efb86f0e95917d103e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Chapeaux?= Date: Thu, 6 Sep 2001 20:37:34 +0000 Subject: [PATCH] fixed possible bug --- lib.inc.php3 | 8 +++++--- tbl_dump.php3 | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lib.inc.php3 b/lib.inc.php3 index 519e92978..8d4a2e33c 100755 --- a/lib.inc.php3 +++ b/lib.inc.php3 @@ -100,7 +100,8 @@ if (!defined('__LIB_INC__')){ } // If zlib output compression is set in the php configuration file, no // output buffering should be run - if (@function_exists('ini_get') && @ini_get('zlib.output_compression')) { + if (PHP_INT_VERSION < 40000 + || (PHP_INT_VERSION >= 40005 && @ini_get('zlib.output_compression'))) { $cfgOBGzip = FALSE; } // Gets some constants @@ -112,8 +113,9 @@ if (!defined('__LIB_INC__')){ * Loads the mysql extensions if it is not loaded yet * staybyte - 26. June 2001 */ - if (PHP_INT_VERSION > 30009 - && (!@get_cfg_var('safe_mode') && @function_exists('dl'))) { + if (((PHP_INT_VERSION >= 40000 && !@ini_get('safe_mode')) + || (PHP_INT_VERSION > 30009 && !@get_cfg_var('safe_mode'))) + && @function_exists('dl')) { if (PHP_INT_VERSION < 40000) { $extension = 'MySQL'; } else { diff --git a/tbl_dump.php3 b/tbl_dump.php3 index f87a1a84f..2caceaa5b 100755 --- a/tbl_dump.php3 +++ b/tbl_dump.php3 @@ -241,13 +241,13 @@ else { */ // 1. as a bzipped file if (isset($bzip) && $bzip == 'bzip') { - if (@function_exists('bzcompress')) { + if (PHP_INT_VERSION >= 40004 && @function_exists('bzcompress')) { echo bzcompress($dump_buffer); } } // 2. as a gzipped file else if (isset($gzip) && $gzip == 'gzip') { - if ($gzip == 'gzip' && @function_exists('gzencode')) { + if (PHP_INT_VERSION >= 40004 && @function_exists('gzencode')) { // without the optional parameter level because it bug echo gzencode($dump_buffer); }