From 51985c9da98eeb1c8492b6de3be14191f53cb27f Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Mon, 23 Jun 2025 17:07:14 +0200 Subject: [PATCH] Revert "minor #60377 [HttpFoundation] Emit PHP warning when `Response::sendHeaders()` is called while output has already been sent (ivo95v)" This reverts commit cf554e1be6338c1176832dd4cdf713d88d3144ad, reversing changes made to 392d0c9c407d6b06a072600fe9dc2a779b231ce0. --- src/Symfony/Component/HttpFoundation/Response.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/Symfony/Component/HttpFoundation/Response.php b/src/Symfony/Component/HttpFoundation/Response.php index 6766f2c77099e..638b5bf601347 100644 --- a/src/Symfony/Component/HttpFoundation/Response.php +++ b/src/Symfony/Component/HttpFoundation/Response.php @@ -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; } pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy