Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: base_url() removes trailing slash in baseURL #7200

Merged
merged 2 commits into from
Jan 31, 2023

Conversation

kenjis
Copy link
Member

@kenjis kenjis commented Jan 30, 2023

Description
Fixes #7184

base_url() without arguments returns http://localhost:8080, not http://localhost:8080/.
The baseURL should have trailing slash, and there is no reason to remove it.
CI3's base_url() returns the URL with trailing slash.

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@kenjis kenjis added the bug Verified issues on the current code behavior or pull requests that will fix them label Jan 30, 2023
@samsonasik
Copy link
Member

Upgrade note seems need to be updated in case user use base_url() with their own tweak to add / after

@kenjis kenjis added the docs needed Pull requests needing documentation write-ups and/or revisions. label Jan 30, 2023
Copy link
Member

@MGatner MGatner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't recall why this was as such but please do indicate it in the changelogs as this could cause a mess for people, especially in tests.

@kenjis kenjis added breaking change Pull requests that may break existing functionalities and removed docs needed Pull requests needing documentation write-ups and/or revisions. labels Jan 30, 2023
@kenjis
Copy link
Member Author

kenjis commented Jan 30, 2023

Added the docs.

@kenjis kenjis requested review from samsonasik and MGatner January 30, 2023 23:54
@kenjis kenjis merged commit ea1b628 into codeigniter4:develop Jan 31, 2023
@kenjis kenjis deleted the fix-base_url branch January 31, 2023 00:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Pull requests that may break existing functionalities bug Verified issues on the current code behavior or pull requests that will fix them
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: base_url() removes trailing slash in baseURL
3 participants