From 2fe022863e4def01d2a43a3eea9e70abaea35598 Mon Sep 17 00:00:00 2001 From: Tomohiro Murota Date: Mon, 30 May 2022 12:29:09 +0900 Subject: [PATCH] docs: add user guide about breaking changes of previous_url --- user_guide_src/source/changelogs/v4.2.0.rst | 1 + user_guide_src/source/installation/upgrade_420.rst | 1 + 2 files changed, 2 insertions(+) diff --git a/user_guide_src/source/changelogs/v4.2.0.rst b/user_guide_src/source/changelogs/v4.2.0.rst index b314dd892794..3809b542e318 100644 --- a/user_guide_src/source/changelogs/v4.2.0.rst +++ b/user_guide_src/source/changelogs/v4.2.0.rst @@ -23,6 +23,7 @@ BREAKING - To prevent unexpected access from the web browser, if a controller is added to a cli route (``$routes->cli()``), all methods of that controller are no longer accessible via auto-routing. - There is a possible backward compatibility break for those users extending the History Collector and they should probably update ``History::setFiles()`` method. - The :php:func:`dot_array_search`'s unexpected behavior has been fixed. Now ``dot_array_search('foo.bar.baz', ['foo' => ['bar' => 23]])`` returns ``null``. The previous versions returned ``23``. +- The ``CodeIgniter::storePreviousURL()`` has been changed to store only the URLs whose Content-Type was ``text/html``. It also affects the behavior of ``previous_url()`` and ``redirect()->back()``. Enhancements ************ diff --git a/user_guide_src/source/installation/upgrade_420.rst b/user_guide_src/source/installation/upgrade_420.rst index b011db54dfe4..88ddec7ff65c 100644 --- a/user_guide_src/source/installation/upgrade_420.rst +++ b/user_guide_src/source/installation/upgrade_420.rst @@ -33,6 +33,7 @@ Breaking Changes **************** - The ``system/bootstrap.php`` file no longer returns a ``CodeIgniter`` instance, and does not load the ``.env`` file (now handled in ``index.php`` and ``spark``). If you have code that expects these behaviors it will no longer work and must be modified. This has been changed to make `Preloading `_ easier to implement. +- ``previous_url()`` has been changed to return only the URLs whose Content-Type was ``text/html``. Accordingly, the behavior of ``redirect()->back()`` has been changed. Breaking Enhancements *********************