From 9ca04ea1011600a97c861a90eec0efff96a6b246 Mon Sep 17 00:00:00 2001 From: "Alexander M. Turek" Date: Fri, 6 Dec 2002 19:06:04 +0000 Subject: [PATCH] patch #647148 --- ChangeLog | 2 ++ Documentation.html | 4 ++-- libraries/ob.lib.php3 | 11 +++++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8db75bbd6..65c901b02 100755 --- a/ChangeLog +++ b/ChangeLog @@ -16,6 +16,8 @@ $Source$ 2002-12-06 Alexander M. Turek * lang/german.inc.php3: Updates. * main.php3: Fixed bug #649641 (usernames containing '@' character). + * libaraies/ob.lib.php3: Merged patch #647148 (Fix for Output Handler + warning / php >= 4.3.0) by Mats Engstrom (matseng). 2002-12-06 Marc Delisle * lang/*.php3, pdf_schema.php3, pdf_pages.php3, db_details_structure.php3: diff --git a/Documentation.html b/Documentation.html index aa4aab584..bad93cfb2 100755 --- a/Documentation.html +++ b/Documentation.html @@ -2726,8 +2726,8 @@ enhancements, bugfixes or support for a new language since version 2.1.0: Bora Alioglu, Ricardo ?, Sven-Erik Andersen, Alessandro Astarita, Péter Bakondy, Borges Botelho, Olivier Bussier, Neil Darlow, -Ian Davidson, Laurent Dhima, Kristof Hamann, Thomas Kläger, Lubos Klokner, -Martin Marconcini, Girish Nair, David Nordenberg, Andreas Pauley, +Mats Engstrom, Ian Davidson, Laurent Dhima, Kristof Hamann, Thomas Kläger, +Lubos Klokner, Martin Marconcini, Girish Nair, David Nordenberg, Andreas Pauley, Bernard M. Piller, Laurent Haas, "Sakamoto", Yuval Sarna, www.securereality.com.au, Alvar Soome, Siu Sun, Peter Svec, Michael Tacelosky, Rachim Tamsjadi, Kositer Uros, Luís V., Martijn W. van der Lee, diff --git a/libraries/ob.lib.php3 b/libraries/ob.lib.php3 index b2711f0c4..b40186ce9 100644 --- a/libraries/ob.lib.php3 +++ b/libraries/ob.lib.php3 @@ -46,6 +46,17 @@ if (!defined('PMA_OB_LIB_INCLUDED')) { } // End patch + // If output buffering is enabled in php.ini it's not possible to + // add the ob_gzhandler without a warning message from php 4.3.0. + // Being better safe than sorry, check for any existing output handler + // instead of just checking the 'output_buffering' setting. + // + if (PMA_PHP_INT_VERSION >= 40300 && @function_exists('ob_get_level')) { + if (ob_get_level() > 0) { + $mode = 0; + } + } + // Zero (0) is no mode or in other words output buffering is OFF. // Follow 2^0, 2^1, 2^2, 2^3 type values for the modes. // Usefull if we ever decide to combine modes. Then a bitmask field of