Skip to content

Commit

Permalink
Merge pull request #117 from JayyWalker/fix-buffering
Browse files Browse the repository at this point in the history
FIX check if there is a buffer before cleaning it.
  • Loading branch information
l0gicgate committed Aug 11, 2019
2 parents 737c544 + 3552644 commit 6a570ae
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Application/ResponseEmitter/ResponseEmitter.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ public function emit(ResponseInterface $response): void
->withAddedHeader('Cache-Control', 'post-check=0, pre-check=0')
->withHeader('Pragma', 'no-cache');

ob_clean();
if (ob_get_contents()) {
ob_clean();
}

parent::emit($response);
}
}

0 comments on commit 6a570ae

Please sign in to comment.