[BUGFIX] PreparedStatement: count() must be an array or countable
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Classes / Database / PreparedStatement.php
index fe1e5f9..d1db632 100644 (file)
@@ -597,7 +597,7 @@ class PreparedStatement
      */
     protected function convertNamedPlaceholdersToQuestionMarks(&$query, array &$parameterValues, array &$precompiledQueryParts)
     {
-        $queryPartsCount = count($precompiledQueryParts['queryParts']);
+        $queryPartsCount = is_array($precompiledQueryParts['queryParts']) ? count($precompiledQueryParts['queryParts']) : 0;
         $newParameterValues = [];
         $hasNamedPlaceholders = false;