Skip to content
Snippets Groups Projects
Commit 48a0b693 authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch #1651010 by pounard: HttpKernel patch introduces ob_flush() related...

- Patch #1651010 by pounard: HttpKernel patch introduces ob_flush() related PHP warnings on my environement, potential patch and performance improvement.
parent acf07373
Branches
Tags 6.0-rc-3
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -41,7 +41,17 @@ public function onTerminate(PostResponseEvent $event) {
drupal_serve_page_from_cache($cache);
}
else {
ob_flush();
// This listener will be run in all cases, including when sending an HTTP
// redirect code. In this particular case, PHP output buffer has not been
// initialized yet and won't be, calling the ob_end_flush() method would
// throw PHP warnings.
// See http://www.php.net/manual/en/function.ob-end-flush.php#42979
while (ob_get_level() > 0) {
// Using ob_end_flush() instead of ob_flush() will close the output
// buffer. This means that potential later errors won't get to the user
// and the HTTPd might release the connection sooner.
ob_end_flush();
}
}
_registry_check_code(REGISTRY_WRITE_LOOKUP_CACHE);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment