[FOLLOWUP][TASK] Refactor queryBuilder usage 91/50391/2
authorAnja Leichsenring <aleichsenring@ab-softlab.de>
Wed, 26 Oct 2016 15:59:22 +0000 (17:59 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Wed, 26 Oct 2016 16:16:01 +0000 (18:16 +0200)
Double usage of ->createNamedParameter() on searchWord results
in always empty result list for EM TER search action.

Resolves: #78437
Releases: master
Change-Id: I5a6f1376e538b63fc5bde43daba2e75d582fde90
Reviewed-on: https://review.typo3.org/50391
Reviewed-by: Mathias Brodala <mbrodala@pagemachine.de>
Reviewed-by: Claus Due <claus@phpmind.net>
Tested-by: TYPO3com <no-reply@typo3.com>
Tested-by: Marco Bresch <marco.bresch@starfinanz.de>
Reviewed-by: Marco Bresch <marco.bresch@starfinanz.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/extensionmanager/Classes/Domain/Repository/ExtensionRepository.php

index c73f21f..5c02f2c 100644 (file)
@@ -151,9 +151,7 @@ class ExtensionRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
             ->getQueryBuilderForTable(self::TABLE_NAME);
 
         $searchPlaceholder = $queryBuilder->createNamedParameter($searchString);
-        $searchPlaceholderForLike = $queryBuilder->createNamedParameter(
-            '%' . $queryBuilder->escapeLikeWildcards($searchString) . '%'
-        );
+        $searchPlaceholderForLike = '%' . $queryBuilder->escapeLikeWildcards($searchString) . '%';
 
         $searchConstraints = [
             'extension_key' => $queryBuilder->expr()->eq(