[FOLLOWUP][TASK] Refactor use of queryBuilder to use prepared statements 25/50425/2
authorMarkus Klein <markus.klein@typo3.org>
Fri, 28 Oct 2016 21:30:56 +0000 (23:30 +0200)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Sat, 29 Oct 2016 07:46:48 +0000 (09:46 +0200)
Fix mistakes.

Resolves: #78437
Releases: master
Change-Id: Iefe82b5c2ef0f3643c3c69cda82de0992a10dd00
Reviewed-on: https://review.typo3.org/50425
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: TYPO3com <no-reply@typo3.com>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
Reviewed-by: Daniel Goerz <ervaude@gmail.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/core/Classes/Resource/Index/FileIndexRepository.php

index 2e1fdf4..3e654c3 100644 (file)
@@ -184,7 +184,7 @@ class FileIndexRepository implements SingletonInterface
             ->select(...$this->fields)
             ->from($this->table)
             ->where(
-                $queryBuilder->expr()->eq('sha1', $queryBuilder->createNamedParameter($hash), \PDO::PARAM_STR)
+                $queryBuilder->expr()->eq('sha1', $queryBuilder->createNamedParameter($hash, \PDO::PARAM_STR))
             )
             ->execute()
             ->fetchAll();
@@ -259,7 +259,7 @@ class FileIndexRepository implements SingletonInterface
             ->where(
                 $queryBuilder->expr()->in(
                     'folder_hash',
-                    $queryBuilder->createNamedParameter($folderIdentifiers, Connection::PARAM_INT_ARRAY)
+                    $queryBuilder->createNamedParameter($folderIdentifiers, Connection::PARAM_STR_ARRAY)
                 ),
                 $queryBuilder->expr()->in(
                     'storage',