From 63a6fc7d3b8cd21540edfdccf9699ba3d3a1160a Mon Sep 17 00:00:00 2001 From: michalsn Date: Fri, 25 Oct 2024 12:51:44 +0200 Subject: [PATCH] add a note to the user guide --- user_guide_src/source/outgoing/response.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/user_guide_src/source/outgoing/response.rst b/user_guide_src/source/outgoing/response.rst index c23b44b700fa..034eca9289b6 100644 --- a/user_guide_src/source/outgoing/response.rst +++ b/user_guide_src/source/outgoing/response.rst @@ -57,6 +57,10 @@ which can be either a string or an array of values that will be combined correct Using these functions instead of using the native PHP functions allows you to ensure that no headers are sent prematurely, causing errors, and makes testing possible. +.. important:: Since v4.6.0, if you set a header using PHP's native ``header()`` + function and then use the ``Response`` class to set the same header, the + previous one will be overwritten. + .. note:: This method just sets headers to the response instance. So, if you create and return another response instance (e.g., if you call :php:func:`redirect()`), the headers set here will not be sent automatically.