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

Change current_url() to use cloned URI #2420

Merged
merged 1 commit into from
Nov 20, 2019

Conversation

MGatner
Copy link
Member

@MGatner MGatner commented Nov 20, 2019

Description
Presently current_url() returns a reference to the shared Request service's URI property, making it possible to use the returned object to modify the global Request object to undesirable effect.

This PR makes current_url() return a cloned version of the URI object so it can be manipulated freely. One word - I added one word for a bug that took over an hour to track down. ONE. WORD.

Checklist:

  • Securely signed commits
  • Component(s) with PHPdocs
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@lonnieezell lonnieezell merged commit 0595045 into codeigniter4:develop Nov 20, 2019
@MGatner MGatner deleted the clone-current-url branch November 20, 2019 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants