Skip to content

Commit

Permalink
add a note to the user guide
Browse files Browse the repository at this point in the history
  • Loading branch information
michalsn committed Oct 25, 2024
1 parent 9b39f96 commit 63a6fc7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions user_guide_src/source/outgoing/response.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 63a6fc7

Please sign in to comment.