[BUGFIX] Correct invalid complex query in Doctrine for fetching workspaces 78/53578/2
authorXavier Perseguers <xavier@typo3.org>
Mon, 24 Jul 2017 11:49:05 +0000 (13:49 +0200)
committerOliver Hader <oliver.hader@typo3.org>
Mon, 24 Jul 2017 13:06:37 +0000 (15:06 +0200)
Change-Id: I447274bc29d1a32745224b6cf5c2e2f76c7dfc2f
Resolves: #81947
Releases: master, 8.7
Reviewed-on: https://review.typo3.org/53578
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
typo3/sysext/workspaces/Classes/Service/AutoPublishService.php

index b248456..073477c 100644 (file)
@@ -50,8 +50,8 @@ class AutoPublishService
                     'pid',
                     $queryBuilder->createNamedParameter(0, \PDO::PARAM_INT)
                 ),
-                $queryBuilder->orWhere(
-                    $queryBuilder->andWhere(
+                $queryBuilder->expr()->orX(
+                    $queryBuilder->expr()->andX(
                         $queryBuilder->expr()->neq(
                             'publish_time',
                             $queryBuilder->createNamedParameter(0, \PDO::PARAM_INT)
@@ -61,7 +61,7 @@ class AutoPublishService
                             $queryBuilder->createNamedParameter($GLOBALS['EXEC_TIME'], \PDO::PARAM_INT)
                         )
                     ),
-                    $queryBuilder->andWhere(
+                    $queryBuilder->expr()->andX(
                         $queryBuilder->expr()->eq(
                             'publish_time',
                             $queryBuilder->createNamedParameter(0, \PDO::PARAM_INT)