[BUGFIX] Fix wrong parenthesis in Typo3DbBackend
authorAnja Leichsenring <aleichsenring@ab-softlab.de>
Fri, 8 Mar 2013 15:19:48 +0000 (16:19 +0100)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Mon, 18 Mar 2013 20:38:34 +0000 (21:38 +0100)
Fixes an erroneously placed parenthesis in getObjectDataByQuery() for
retrieving the correct table name.

If dbal is in use, this leads to the reported failure.

Fixes: #46133
Relates: #43058
Releases: 6.1, 6.0, 4.7, 1.4, 1.3
Change-Id: I958dc954f0c1e11c6851e6d5dc2514e13d4eed31
Reviewed-on: https://review.typo3.org/18817
Reviewed-by: Markus Klein
Reviewed-by: Oliver Hader
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
typo3/sysext/extbase/Classes/Persistence/Generic/Storage/Typo3DbBackend.php

index f765c1a..6cf6e6a 100644 (file)
@@ -266,7 +266,7 @@ class Typo3DbBackend implements \TYPO3\CMS\Extbase\Persistence\Generic\Storage\B
                        $sql = $this->buildQuery($statementParts, $parameters);
                }
                $tableName = 'foo';
-               if (is_array($statementParts && !empty($statementParts['tables'][0]))) {
+               if (is_array($statementParts) && !empty($statementParts['tables'][0])) {
                        $tableName = $statementParts['tables'][0];
                }
                $this->replacePlaceholders($sql, $parameters, $tableName);