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

Bug: Mistake in uri_string() documentation #2972

Closed
SoulReaver opened this issue May 11, 2020 · 1 comment
Closed

Bug: Mistake in uri_string() documentation #2972

SoulReaver opened this issue May 11, 2020 · 1 comment
Labels
bug Verified issues on the current code behavior or pull requests that will fix them

Comments

@SoulReaver
Copy link

SoulReaver commented May 11, 2020

Describe the bug
According to docs uri_string function

Returns the path part of your current URL.

While it returns path part relative to base_url.

CodeIgniter 4 version
4.0.3

Affected module(s)
docs (or URL Helper if what's in docs was the intended functionality)

Expected behavior, and steps to reproduce if appropriate
example page in service: example.com/ci-blog/login
base url: example.com/ci-blog/
url to the page relative to base url: login
uri_string returns: login
according to docs it should return: /ci-blog/login (or without initial slash)

While it can be considered that it's the function that does not work as intended, I think the way it works currently is the one that's the most useful. That's why I'd like to suggest updating documentation instead:

Returns the path part of your current URL ** that is relative to base url**.

Context

  • OS: Windows 10
  • Web server: Apache 2.4.41
  • PHP version: 7.3.12
@SoulReaver SoulReaver added the bug Verified issues on the current code behavior or pull requests that will fix them label May 11, 2020
@michalsn
Copy link
Member

Yes, it's a mistake in the docs. We definitely want it to be relative to baseUrl.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified issues on the current code behavior or pull requests that will fix them
Projects
None yet
Development

No branches or pull requests

2 participants