Bug #95852
closedLogic Exception when entering a single character in Indexed Search
100%
Description
When submitting indexed search with only one character, a logic exception is thrown:
"You need to add at least one set of values before generating the SQL."
The Exception is caused by passing an empty array to QueryBuilder in
TYPO3\CMS\IndexedSearch\Controller\SearchController::writeSearchStat (line 876-881)
This method has an early return (line 862), however, in order to return early, the exit condition requires both the array passed in to be empty (which is the case when searching for one character since minimum length is 2 chars) and the property $sword to be empty, which is not the case when entering a single char.
Updated by Gerrit Code Review about 3 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/72046
Updated by Gerrit Code Review about 3 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/72046
Updated by Benni Mack about 3 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset fb65ea086d5fb893a21c42dc8423a2ad9ae4c7ce.