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

Query parameter "q" does not work #107

Closed
janousek opened this issue Dec 8, 2020 · 5 comments
Closed

Query parameter "q" does not work #107

janousek opened this issue Dec 8, 2020 · 5 comments

Comments

@janousek
Copy link

janousek commented Dec 8, 2020

Expression on this line:

$this->query = (string)($uri->param('q', null) ?? $uri->query('q') ?: '');

Returns empty string even if there is "?q=something" in the request URL.

I belive that this line should looks like this:

$this->query = (string)($uri->param('q', null) ?: $uri->query('q') ?: ''); 

Because "$uri->param('q', null)" can return "false".

@bricebou
Copy link

Thanks a lot !

@schnumsel
Copy link
Contributor

Anybody created a Pull Request allready? If not I could do so...

schnumsel added a commit to schnumsel/grav-plugin-tntsearch that referenced this issue Jan 5, 2021
Query parameter "q" does not work
@schnumsel
Copy link
Contributor

Just did it :)

@Sthaagg
Copy link

Sthaagg commented Jan 9, 2021

Thank you so much ! Works like a charm !

rhukster pushed a commit that referenced this issue Feb 25, 2021
Query parameter "q" does not work
@rhukster
Copy link
Member

PR merged and released

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

No branches or pull requests

5 participants