Skip to content

Commit ff43b9f

Browse files
committed
docs: add explanation for redirect()
1 parent 5a599dd commit ff43b9f

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

user_guide_src/source/installation/upgrade_4xx.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,11 @@ Helpers
131131
will be :doc:`../helpers/filesystem_helper` in CI4.
132132
- `String Helper <https://www.codeigniter.com/userguide3/helpers/string_helper.html>`_ functions
133133
in CI3 are included in :doc:`../helpers/text_helper` in CI4.
134-
- In CI4, ``redirect()`` returns a ``RedirectResponse`` instance instead of redirecting and terminating script execution. You must return it.
134+
- In CI4, ``redirect()`` is completely changed from CI3's.
135135
- `redirect() Documentation CodeIgniter 3.X <https://codeigniter.com/userguide3/helpers/url_helper.html#redirect>`_
136136
- `redirect() Documentation CodeIgniter 4.X <../general/common_functions.html#redirect>`_
137+
- In CI4, ``redirect()`` returns a ``RedirectResponse`` instance instead of redirecting and terminating script execution. You must return it.
138+
- You need to change CI3's ``redirect('login/form')`` to ``return redirect()->to('login/form')``.
137139

138140
Hooks
139141
=====

0 commit comments

Comments
 (0)