Project

General

Profile

Actions

Bug #95852

closed

Logic Exception when entering a single character in Indexed Search

Added by Alexander Künzl over 2 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Indexed Search
Target version:
-
Start date:
2021-11-02
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
11
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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.

Actions #1

Updated by Gerrit Code Review over 2 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

Actions #2

Updated by Gerrit Code Review over 2 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

Actions #3

Updated by Benni Mack over 2 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #4

Updated by Benni Mack over 1 year ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF