[BUGFIX] Fix sorting extensions in "Get Extensions" module 07/54707/2
authorNicole Cordes <typo3@cordes.co>
Mon, 20 Nov 2017 14:33:53 +0000 (15:33 +0100)
committerNicole Cordes <typo3@cordes.co>
Tue, 21 Nov 2017 10:31:05 +0000 (11:31 +0100)
During some Doctrine cleanup the constraint for fetching extension by
extension key got messed up. This patch removes double named parameter
in search constraint.

Resolves: #80555
Releases: master, 8.7
Change-Id: I84636b4a86d8b3946c552031e3cb23ae69cd3f2a
Reviewed-on: https://review.typo3.org/54707
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes <typo3@cordes.co>
typo3/sysext/extensionmanager/Classes/Domain/Repository/ExtensionRepository.php

index b4c61eb..54d0c71 100644 (file)
@@ -148,13 +148,12 @@ class ExtensionRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
         $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
             ->getQueryBuilderForTable(self::TABLE_NAME);
 
-        $searchPlaceholder = $queryBuilder->createNamedParameter($searchString);
         $searchPlaceholderForLike = '%' . $queryBuilder->escapeLikeWildcards($searchString) . '%';
 
         $searchConstraints = [
             'extension_key' => $queryBuilder->expr()->eq(
                 'extension_key',
-                $queryBuilder->createNamedParameter($searchPlaceholder, \PDO::PARAM_STR)
+                $queryBuilder->createNamedParameter($searchString, \PDO::PARAM_STR)
             ),
             'extension_key_like' => $queryBuilder->expr()->like(
                 'extension_key',