[BUGFIX] PreparedStatement: count() must be an array or countable
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Classes / Database / PreparedStatement.php
index 01460af..052033e 100644 (file)
@@ -603,7 +603,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;