Project

General

Profile

Actions

Bug #96454

closed

Wrong checks for TCA search options in DatabaseRecordList

Added by Nikita Hovratov almost 3 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend API
Target version:
-
Start date:
2022-01-04
Due date:
% Done:

100%

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

Description

The documentation states "pidonly" and "case" are boolean values.
https://docs.typo3.org/m/typo3/reference-tca/11.5/en-us/ColumnsConfig/CommonProperties/Search.html

But instead of checking the keys, in_array() is used.

                    if (in_array('case', $searchConfig, true)) {
                        // Replace case insensitive default constraint
                        $searchConstraint = $expressionBuilder->andX($expressionBuilder->like($fieldName, $like));
                    }
                    if (in_array('pidonly', $searchConfig, true) && $currentPid > 0) {
                        $searchConstraint->add($expressionBuilder->eq($tablePidField, (int)$currentPid));
                    }

This has been fixed some time ago for the other if-branch some lines above, but not for this one.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #89002: List view search can't search for integer search phraseClosed2019-08-23

Actions
Actions

Also available in: Atom PDF