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 SQL error when product search starts with an hyphen #8348

Merged
merged 1 commit into from Oct 31, 2017

Conversation

Projects
None yet
5 participants
@Quetzacoalt91
Member

Quetzacoalt91 commented Sep 19, 2017

Questions Answers
Branch? develop
Description? When you look for a product on the Front-office, with only one word starting with an hyphen, you get a SQL error because a subrequest was not defined but used anyway later.
Type? bug fix
Category? FO
BC breaks? Nope
Deprecations? Nope
Fixed ticket? /
How to test? Create 2 products: ZFR6FIX-11PS & BKR5EIX-11PS. Refresh the search index then do a search with -11. You should not see an error 500 anymore.

Previous error:

capture du 2017-09-19 17-12-27


This change is Reviewable

Show outdated Hide outdated classes/Search.php Outdated
@codacy-bot

This comment has been minimized.

Show comment
Hide comment
@codacy-bot

codacy-bot Oct 2, 2017

Codacy Here is an overview of what got changed by this pull request:

Complexity decreasing per file
==============================
+ classes/Search.php  -2
         

See the complete overview on Codacy

codacy-bot commented Oct 2, 2017

Codacy Here is an overview of what got changed by this pull request:

Complexity decreasing per file
==============================
+ classes/Search.php  -2
         

See the complete overview on Codacy

@mickaelandrieu

This comment has been minimized.

Show comment
Hide comment
@mickaelandrieu

mickaelandrieu Oct 31, 2017

Contributor

Tested and QA ok

done

LGTM

Contributor

mickaelandrieu commented Oct 31, 2017

Tested and QA ok

done

LGTM

@mickaelandrieu mickaelandrieu merged commit 62b6ff2 into PrestaShop:develop Oct 31, 2017

2 checks passed

codacy/pr Good work! A positive pull request.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@Quetzacoalt91 Quetzacoalt91 deleted the Quetzacoalt91:fix-search-with-hyphen branch Nov 7, 2017

@eternoendless eternoendless added this to the 1.7.3.0 milestone Apr 13, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment