Skip to content

Commit a78d8dd

Browse files
committed
Merge branch 'ensure-ob-end-flush'
2 parents 742891a + 59377da commit a78d8dd

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/Listener/Mvc.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ public function phpError(MvcEvent $e) : void
6666
\ini_set('display_errors', '0');
6767
}
6868

69+
while (\ob_get_level() > 0) {
70+
\ob_end_flush();
71+
}
72+
6973
\ob_start([$this, 'phpFatalErrorHandler']);
7074
\register_shutdown_function([$this, 'execOnShutdown']);
7175
\set_error_handler([$this, 'phpErrorHandler']);

src/Middleware/Expressive.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ public function phpError() : void
6969
\ini_set('display_errors', '0');
7070
}
7171

72+
while (\ob_get_level() > 0) {
73+
\ob_end_flush();
74+
}
75+
7276
\ob_start([$this, 'phpFatalErrorHandler']);
7377
\register_shutdown_function([$this, 'execOnShutdown']);
7478
\set_error_handler([$this, 'phpErrorHandler']);

0 commit comments

Comments
 (0)