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 splitQueryPart() #2497

Merged

Conversation

MashinaMashina
Copy link
Contributor

@MashinaMashina MashinaMashina commented Jan 17, 2020

Bug:
redirect()->to('/?param') returns url without param

If param has not value, it removes
/?param=1 => /?param=1
/?param => /

In php if you open page with ?param in $_GET array you will see this:
array (
[param] => '',
)

@MashinaMashina
Copy link
Contributor Author

@lonnieezell why not just use parse_str() instead splitQueryPart()+decode()+other code in setQuery() ?

@lonnieezell
Copy link
Member

why not just use parse_str() instead splitQueryPart()+decode()+other code in setQuery() ?

Honestly - because that function slipped my mind at the time and i was up to my eyes reading HTTP specs at the time :)

That's a perfectly good solution if you want to update to that.

@MashinaMashina
Copy link
Contributor Author

@lonnieezell now code via parse_str

@lonnieezell lonnieezell merged commit fedae3c into codeigniter4:develop Jan 22, 2020
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