mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[ticket/10191] Use ob_get_level in exit_handler for output buffering check.
Calling flush() when output buffering is enabled causes output to be duplicated. Besides phpBB enabling output buffering for gzip compression, output buffering may be enabled externally to phpBB via output_handler or output_buffering directives in php.ini. Use ob_get_level to determine whether output buffering is active and call ob_flush in that case. PHPBB3-10191
This commit is contained in:
parent
5e81b058cf
commit
44cc8153cd
1 changed files with 1 additions and 1 deletions
|
@ -4719,7 +4719,7 @@ function exit_handler()
|
||||||
}
|
}
|
||||||
|
|
||||||
// As a pre-caution... some setups display a blank page if the flush() is not there.
|
// As a pre-caution... some setups display a blank page if the flush() is not there.
|
||||||
(empty($config['gzip_compress'])) ? @flush() : @ob_flush();
|
(ob_get_level() > 0) ? @ob_flush() : @flush();
|
||||||
|
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue