Skip to content

Commit

Permalink
Merge branch 'backport-ensure-ob-end-flush' into 1.x.x
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Jan 17, 2019
2 parents ea2bc2b + 1730d84 commit 8be4f0d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Listener/Mvc.php
Expand Up @@ -73,6 +73,10 @@ public function phpError(Event $e)
\ini_set('display_errors', '0');
}

while (\ob_get_level() > 0) {
\ob_end_flush();
}

\ob_start([$this, 'phpFatalErrorHandler']);
\register_shutdown_function([$this, 'execOnShutdown']);
\set_error_handler([$this, 'phpErrorHandler']);
Expand Down
4 changes: 4 additions & 0 deletions src/Middleware/Expressive.php
Expand Up @@ -77,6 +77,10 @@ public function phpError()
\ini_set('display_errors', '0');
}

while (\ob_get_level() > 0) {
\ob_end_flush();
}

\ob_start([$this, 'phpFatalErrorHandler']);
\register_shutdown_function([$this, 'execOnShutdown']);
\set_error_handler([$this, 'phpErrorHandler']);
Expand Down

0 comments on commit 8be4f0d

Please sign in to comment.