Index: Classes/Persistence/Storage/Typo3DbBackend.php =================================================================== --- Classes/Persistence/Storage/Typo3DbBackend.php (revision 10487) +++ Classes/Persistence/Storage/Typo3DbBackend.php (working copy) @@ -251,6 +251,8 @@ * @return integer The number of matching tuples */ public function getObjectCountByQuery(Tx_Extbase_Persistence_QueryInterface $query) { + $count = 0; + $constraint = $query->getConstraint(); if($constraint instanceof Tx_Extbase_Persistence_QOM_StatementInterface) { throw new Tx_Extbase_Persistence_Storage_Exception_BadConstraint('Could not execute count on queries with a constraint of type Tx_Extbase_Persistence_QOM_StatementInterface', 1256661045); @@ -274,7 +276,7 @@ $count = current(current($rows)); } $this->databaseHandle->sql_free_result($result); - return $count; + return (int)$count; } /**