Commit 09d43bb3 authored by crell's avatar crell Committed by Christian Kuhn
Browse files

[TASK] Remove superfluous cast in LiveSearch

Used command:

> ./Build/Scripts/runTests.sh -s phpstanGenerateBaseline

Resolves: #98008
Releases: main, 11.5
Change-Id: Iecadad3cc1e5089f0ab7282f5b5302ead66ce6a7
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/75270

Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Stefan Bürk's avatarStefan Bürk <stefan@buerk.tech>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Stefan Bürk's avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: Oliver Klee's avatarOliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
parent b9a0ff26
......@@ -105,11 +105,6 @@ parameters:
count: 1
path: ../../typo3/sysext/backend/Classes/Search/LiveSearch/LiveSearch.php
-
message: "#^Parameter \\#1 \\$value of method TYPO3\\\\CMS\\\\Core\\\\Database\\\\Query\\\\QueryBuilder\\:\\:escapeLikeWildcards\\(\\) expects string, int given\\.$#"
count: 1
path: ../../typo3/sysext/backend/Classes/Search/LiveSearch/LiveSearch.php
-
message: "#^Method TYPO3\\\\CMS\\\\Backend\\\\Search\\\\LiveSearch\\\\QueryParser\\:\\:getId\\(\\) should return int but returns string\\.$#"
count: 1
......
......@@ -325,7 +325,7 @@ class LiveSearch
$constraints[] = $queryBuilder->expr()->like(
$fieldName,
$queryBuilder->createNamedParameter(
'%' . $queryBuilder->escapeLikeWildcards((int)$this->queryString) . '%',
'%' . $queryBuilder->escapeLikeWildcards($this->queryString) . '%',
\PDO::PARAM_STR
)
);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment