Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Revert "minor #60377 [HttpFoundation] Emit PHP warning when `Response…
…::sendHeaders()` is called while output has already been sent (ivo95v)"

This reverts commit cf554e1, reversing
changes made to 392d0c9.
  • Loading branch information
nicolas-grekas committed Jun 23, 2025
commit 51985c9da98eeb1c8492b6de3be14191f53cb27f
5 changes: 0 additions & 5 deletions src/Symfony/Component/HttpFoundation/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -317,11 +317,6 @@ public function sendHeaders(?int $statusCode = null): static
{
// headers have already been sent by the developer
if (headers_sent()) {
if (!\in_array(\PHP_SAPI, ['cli', 'phpdbg', 'embed'], true)) {
$statusCode ??= $this->statusCode;
header(\sprintf('HTTP/%s %s %s', $this->version, $statusCode, $this->statusText), true, $statusCode);
}

return $this;
}

Expand Down
Loading