Commit 48a0b693 authored by Dries's avatar Dries

- 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
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment