File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66### Breaking Changes
77
88* fix: base_url() removes trailing slash in baseURL by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/7200
9+ * fix: remove parameter $relative in ` uri_string() ` by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/7135
910
1011### Fixed Bugs
1112
1415* fix: remove ` All ` from ` Options All -Indexes ` in .htaccess by @sba in https://github.com/codeigniter4/CodeIgniter4/pull/7093
1516* fix: bug on stuck content-type header in Feature Testing by @baycik in https://github.com/codeigniter4/CodeIgniter4/pull/7112
1617* fix: ordering ` Validation ` show error by call ` setRule() ` by @ddevsr in https://github.com/codeigniter4/CodeIgniter4/pull/7149
17- * fix: remove parameter $relative in ` uri_string() ` by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/7135
1818* fix: [ QueryBuilder] where() generates incorrect SQL when using RawSql by @sclubricants in https://github.com/codeigniter4/CodeIgniter4/pull/7147
1919* fix: [ QueryBuilder] RawSql passed to set() disappears without error by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/7148
2020* fix: [ Parser] local_currency causes "Passing null to parameter" by @kenjis in https://github.com/codeigniter4/CodeIgniter4/pull/7157
Original file line number Diff line number Diff line change @@ -23,11 +23,16 @@ base_url()
2323- Now it returns baseURL with a trailing slash. This is the same behavior as
2424 ``base_url() `` in CodeIgniter 3.
2525
26- Changes
27- *******
26+ .. _v432-uri-string :
27+
28+ uri_string()
29+ ------------
2830
2931- The parameter ``$relative `` in :php:func: `uri_string() ` was removed. Due to a bug,
30- the function always returned a path relative to baseURL. No behavior changes.
32+ the function always returned a path relative to baseURL.
33+ - When baseURL is accessed, it will now return an empty string (``'' ``). This is
34+ the same behavior as ``uri_string() `` in CodeIgniter 3. In previous versions
35+ it returned ``/ ``.
3136
3237Bugs Fixed
3338**********
Original file line number Diff line number Diff line change @@ -32,6 +32,9 @@ Bugs Fixed
3232
3333- **Config: ** Added missing ``Config\Encryption::$cipher ``.
3434- **UserGuide: ** Fixed the sample code for :ref: `encryption-compatible-with-ci3 `.
35+ - **UserGuide: ** Added a missing breaking change in ``uri_string() `` in
36+ :ref: `ChangeLog <v432-uri-string >` and
37+ :ref: `Upgrading Guide <upgrade-432-uri-string >` v4.3.2.
3538
3639See the repo's
3740`CHANGELOG.md <https://github.com/codeigniter4/CodeIgniter4/blob/develop/CHANGELOG.md >`_
Original file line number Diff line number Diff line change @@ -155,6 +155,10 @@ The following functions are available:
155155 However, due to a bug, this function always returned a path relative to baseURL.
156156 Since v4.3.2, the parameter has been removed.
157157
158+ .. note :: In previous versions, when you navigate to the baseURL, this function
159+ returned ``/ ``. Since v4.3.2, the bug has been fixed and it returns an
160+ empty string(``'' ``).
161+
158162.. php :function :: index_page([$altConfig = null])
159163
160164 :param \\ Config\\ App $altConfig: Alternate configuration to use
Original file line number Diff line number Diff line change @@ -27,6 +27,21 @@ slash (``/``). Now it returns baseURL with a trailing slash. For example:
2727
2828If you have code to call ``base_url() `` without argument, you may need to adjust the URLs.
2929
30+ .. _upgrade-432-uri-string :
31+
32+ uri_string()
33+ ============
34+
35+ The :php:func: `uri_string() ` behavior has been fixed. In previous versions, when you
36+ navigate to the baseURL, it returned ``/ ``. Now it returns an empty string (``'' ``).
37+
38+ If you have code to call ``uri_string() ``, you may need to adjust it.
39+
40+ .. note :: The :php:func:`uri_string()` returns a URI path relative to baseURL.
41+ It is not a full URI path if the baseURL contains subfolders.
42+ If you use it for HTML links, it is better to use it with :php:func: `site_url() `
43+ like ``site_url(uri_string()) ``.
44+
3045Mandatory File Changes
3146**********************
3247
You can’t perform that action at this time.
0 commit comments