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
Searching for commas & spaces alone yields Server Error #71
Comments
Experiment D: I see the same Server Error page when I search for a lone comma (i.e. Link: https://demo.getgrav.org/blog-skeleton/search/query:, To demonstrate that this is not limited to searches performed by directly manipulating the URL; entering 2 spaces and a comma (i.e. I think, as long as the search box contains only commas, only spaces, or only commas and spaces, this error will occur. |
I see the same behavior on a site I am developing. On that site, I am running Grav v1.1.5, Admin v1.2.2, and SimpleSearch v1.9.2. |
PHP delivers a warning when mb_stripos() is called with an empty string as its second argument. The if() statement in this commit prevents it from being called that way. Fixes issue getgrav#71.
(not yet released, but in develop) |
Hi @flaviocopes, Tried to "bin/gpm update simplesearch", results: Nothing to update." Then, I updated the file simplesearch.php and that worked perfectly. ;) Thanks! |
When I search for a string consisting of only spaces, by entering those spaces (encoded as
%20
s) directly into the address bar, the Grav Blog Skeleton demo site shows a "Server Error" page. This is shown in the Experiment C section below.Experiment A. Search for non-whitespace characters, using search form:
I get a "0 results" message. I consider this to be the "by design" behavior.
Link: https://demo.getgrav.org/blog-skeleton/search/query:test
Experiment B. Search for whitespace characters only (i.e. 4 spaces, entered as
), using search form:
I get an "Error 404" page.
Link: https://demo.getgrav.org/blog-skeleton/search/query:
Experiment C: Search for whitespace characters only (i.e. 4 spaces, encoded as
%20%20%20%20
), using address bar:I get a "Server Error" page containing information about the PHP code in use.
Link: https://demo.getgrav.org/blog-skeleton/search/query:%20%20%20%20
The text was updated successfully, but these errors were encountered: