[BUGFIX] Use correct type in PageRepository::getDomainStartPage for column fe_group 96/51096/2
authorManuel Selbach <manuel_selbach@yahoo.de>
Mon, 2 Jan 2017 14:11:17 +0000 (15:11 +0100)
committerGeorg Ringer <georg.ringer@gmail.com>
Tue, 3 Jan 2017 06:06:35 +0000 (07:06 +0100)
Strict DBMS will throw an exception for a query where to compare an integer against a column with string values.
There will no "magic" type casting processed, thus we have to use a string instead of an integer.

Change-Id: I740d1797c92f203e83ddfec2ab00df42cc5c53aa
Resolves: #79131
Releases: master
Reviewed-on: https://review.typo3.org/51096
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
typo3/sysext/frontend/Classes/Page/PageRepository.php

index 0454d69..2f61e97 100644 (file)
@@ -1453,7 +1453,7 @@ class PageRepository
         // If the field is NULL, then OK
         $orChecks[] = $expressionBuilder->isNull($field);
         // If the field contains zero, then OK
-        $orChecks[] = $expressionBuilder->eq($field, 0);
+        $orChecks[] = $expressionBuilder->eq($field, $expressionBuilder->literal('0'));
         foreach ($memberGroups as $value) {
             $orChecks[] = $expressionBuilder->inSet($field, $expressionBuilder->literal($value));
         }