Skip to content

Commit

Permalink
[HttpFoundation] move flushing outside of Response::closeOutputBuffers
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Aug 30, 2022
1 parent b2f2e3c commit 518e21d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ public function send()
fastcgi_finish_request();
} elseif (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true)) {
static::closeOutputBuffers(0, true);
flush();
}

return $this;
Expand Down Expand Up @@ -1236,7 +1237,6 @@ public static function closeOutputBuffers(int $targetLevel, bool $flush): void
while ($level-- > $targetLevel && ($s = $status[$level]) && (!isset($s['del']) ? !isset($s['flags']) || ($s['flags'] & $flags) === $flags : $s['del'])) {
if ($flush) {
ob_end_flush();
flush();
} else {
ob_end_clean();
}
Expand Down

0 comments on commit 518e21d

Please sign in to comment.