Skip to content

Commit dd7c025

Browse files
committed
add a note to the user guide
1 parent bdc1a0b commit dd7c025

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

user_guide_src/source/outgoing/response.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ which can be either a string or an array of values that will be combined correct
5757
Using these functions instead of using the native PHP functions allows you to ensure that no headers are sent
5858
prematurely, causing errors, and makes testing possible.
5959

60+
.. important:: Since v4.6.0, if you set a header using PHP's native ``header()``
61+
function and then use the ``Response`` class to set the same header, the
62+
previous one will be overwritten.
63+
6064
.. note:: This method just sets headers to the response instance. So, if you create
6165
and return another response instance (e.g., if you call :php:func:`redirect()`),
6266
the headers set here will not be sent automatically.

0 commit comments

Comments
 (0)