Skip to content

Commit 6a570ae

Browse files
authored
Merge pull request #117 from JayyWalker/fix-buffering
FIX check if there is a buffer before cleaning it.
2 parents 737c544 + 3552644 commit 6a570ae

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/Application/ResponseEmitter/ResponseEmitter.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ public function emit(ResponseInterface $response): void
2525
->withAddedHeader('Cache-Control', 'post-check=0, pre-check=0')
2626
->withHeader('Pragma', 'no-cache');
2727

28-
ob_clean();
28+
if (ob_get_contents()) {
29+
ob_clean();
30+
}
31+
2932
parent::emit($response);
3033
}
3134
}

0 commit comments

Comments
 (0)