[BUGFIX] Fix typo in QueryView 41/61441/2
authorOliver Bartsch <bo@cedev.de>
Mon, 5 Aug 2019 11:40:20 +0000 (13:40 +0200)
committerAndreas Fernandez <a.fernandez@scripting-base.de>
Mon, 5 Aug 2019 14:18:49 +0000 (16:18 +0200)
This fixes a typo in a variable in QueryView.

Resolves: #88920
Releases: master, 9.5
Change-Id: I59b4034931b3f8837aef6dda0c56e342c3552926
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61441
Tested-by: Stefan P <spo@snk.de>
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Stefan P <spo@snk.de>
Reviewed-by: Joerg Kummer <typo3@enobe.de>
Reviewed-by: Guido Schmechel <guido.schmechel@brandung.de>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
typo3/sysext/core/Classes/Database/QueryView.php

index 2e3b565..ebee236 100644 (file)
@@ -622,11 +622,11 @@ class QueryView
                 $queryBuilder->getRestrictions()->removeAll()->add(GeneralUtility::makeInstance(DeletedRestriction::class));
                 $queryBuilder->count('*')->from($table);
                 $likes = [];
-                $excapedLikeString = '%' . $queryBuilder->escapeLikeWildcards($swords) . '%';
+                $escapedLikeString = '%' . $queryBuilder->escapeLikeWildcards($swords) . '%';
                 foreach ($fields as $field) {
                     $likes[] = $queryBuilder->expr()->like(
                         $field,
-                        $queryBuilder->createNamedParameter($excapedLikeString, \PDO::PARAM_STR)
+                        $queryBuilder->createNamedParameter($escapedLikeString, \PDO::PARAM_STR)
                     );
                 }
                 $count = $queryBuilder->orWhere(...$likes)->execute()->fetchColumn(0);
@@ -641,7 +641,7 @@ class QueryView
                     foreach ($fields as $field) {
                         $likes[] = $queryBuilder->expr()->like(
                             $field,
-                            $queryBuilder->createNamedParameter($excapedLikeString, \PDO::PARAM_STR)
+                            $queryBuilder->createNamedParameter($escapedLikeString, \PDO::PARAM_STR)
                         );
                     }
                     $statement = $queryBuilder->orWhere(...$likes)->execute();