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

[5.2] Router: Only throw 404 exception when parsing current URL #43118

Closed
wants to merge 3 commits into from

Conversation

Hackwar
Copy link
Member

@Hackwar Hackwar commented Mar 22, 2024

Pull Request for Issue #42766, #27356 .

Summary of Changes

Right now, when the router is called to parse a URL, a failing parse always throws a 404 exception. This is actually not something that we want. This PR changes the router to only throw a 404 when the $setvars switch is set, since we do that only when we do the initial parsing. If parsing a URL fails without the switch, the returned array should be empty.

Testing Instructions

Codereview

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

Hackwar and others added 2 commits March 26, 2024 12:51
Co-authored-by: Richard Fath <richard67@users.noreply.github.com>
@Hackwar
Copy link
Member Author

Hackwar commented Apr 3, 2024

After discussion in the CMS maintainer meeting, we decided that this is the wrong approach. I'm closing this PR. If you run the parse() method, you have to wrap this with a try-catch block.

@Hackwar Hackwar closed this Apr 3, 2024
@Hackwar Hackwar deleted the 5.2-router-parsing branch April 3, 2024 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants