[BUGFIX] Explicit cast to string for VersionState object 16/52916/3
authorChristian Kuhn <lolli@schwarzbu.ch>
Mon, 22 May 2017 21:12:31 +0000 (23:12 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Mon, 22 May 2017 22:00:40 +0000 (00:00 +0200)
Some DB drivers are picky on their arguments not being
objects. Add an explicit cast to string for a VersionState
object just before it's fed to a query as argument.

Change-Id: I81c8f9dded7068ad7bf817e034aa67a29f28290c
Resolves: #81309
Releases: master, 8.7
Reviewed-on: https://review.typo3.org/52916
Reviewed-by: Claus Due <claus@phpmind.net>
Reviewed-by: Manuel Selbach <manuel_selbach@yahoo.de>
Tested-by: Manuel Selbach <manuel_selbach@yahoo.de>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/frontend/Classes/Page/PageRepository.php

index 1b019b1..b31fb18 100644 (file)
@@ -1664,7 +1664,7 @@ class PageRepository
                         $queryBuilder->expr()->eq(
                             't3ver_state',
                             $queryBuilder->createNamedParameter(
-                                new VersionState(VersionState::MOVE_PLACEHOLDER),
+                                (string)VersionState::cast(VersionState::MOVE_PLACEHOLDER),
                                 \PDO::PARAM_INT
                             )
                         ),