aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2008-06-04 13:39:15 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2008-06-04 13:39:15 +0000
commit374093d6152ff9ff2b232311bfeeafca43a27915 (patch)
treef9e6d249133cd35ad9170475cbdf9602080b6440 /phpBB/includes
parent6ad76d9b62a8eb424939cc7e3c177f942120eedd (diff)
downloadforums-374093d6152ff9ff2b232311bfeeafca43a27915.tar
forums-374093d6152ff9ff2b232311bfeeafca43a27915.tar.gz
forums-374093d6152ff9ff2b232311bfeeafca43a27915.tar.bz2
forums-374093d6152ff9ff2b232311bfeeafca43a27915.tar.xz
forums-374093d6152ff9ff2b232311bfeeafca43a27915.zip
ok, well, my team is allowed to give me some slappage. :/ I now changed this sooo often and never realised the code portion is absolute rubbish... with ini_get returning something completely different. Now, this should work (at least for PHP 5.2.x) - tested all 16 possible combinations of triggering errors before and after headers sent, with and without gzip compression, with and without output buffering. Now, please work for others too...
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8594 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/functions.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 600506d08f..ba12fd6e4e 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -2941,15 +2941,15 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
if (strpos($errfile, 'cache') === false && strpos($errfile, 'template.') === false)
{
// flush the content, else we get a white page if output buffering is on
- if (strtolower(@ini_get('output_buffering')) !== 'off')
+ if ((int) @ini_get('output_buffering') === 1 || strtolower(@ini_get('output_buffering')) === 'on')
{
- @ob_end_flush();
+ @ob_flush();
}
- // Another quick fix for those having gzip compression enabled
+ // Another quick fix for those having gzip compression enabled, but do not flush if the coder wants to catch "something". ;)
if ($config['gzip_compress'])
{
- if (@extension_loaded('zlib') && !headers_sent())
+ if (@extension_loaded('zlib') && !headers_sent() && !ob_get_level())
{
@ob_flush();
}