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

Search (comb) throws exception if search term starts with plus (+) or minus (-) sign #2348

Closed
pxmch opened this issue Feb 11, 2019 · 0 comments

Comments

Projects
None yet
2 participants
@pxmch
Copy link

commented Feb 11, 2019

Describe the bug
If a search term starts with a plus (+) or a minus (-) sign, comb throws the following exception:
ErrorException in Comb.php line 714: Array to string conversion

To Reproduce

  1. Set up a search form with this code:
<form method="get" action="/varia/search" id="search-form">
  <input id="site-search" type="text" value="" class="search-query" name="q">
  <input type="submit" value="Suche" name="Suche" class="btn-search">
</form>
  1. Enter one of the following search terms: +term1 or -term1 or term1 +term2 or term1 -term2
  2. Submit the form.

Expected behavior
The search should return some or no results but not throw an exception

Screenshots
grafik

Environment details (please complete the following information):

  • Statamic Version 2.11.9
  • Fresh Install or Upgrade: fresh install
  • OS: macOS 10.13.6
  • Browser: any browser
  • Web Server: Apache
  • PHP Version: 7.2
  • Addons installed: none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.