Project

General

Profile

Actions

Bug #95852

closed

Logic Exception when entering a single character in Indexed Search

Added by Alexander Künzl about 3 years ago. Updated about 2 years 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

Also available in: Atom PDF