[+BUGFIX] Persistence: return ObjectCount return value as an integer
authorMarc Bastian Heinrichs <heinrichs@mbh-web.de>
Sun, 20 Mar 2011 18:13:14 +0000 (19:13 +0100)
committerMarc Bastian Heinrichs <heinrichs@mbh-web.de>
Sun, 20 Mar 2011 18:13:14 +0000 (19:13 +0100)
As phpdoc states, the function getObjectCountByQuery should return an
integer and not just the number as string, which is the case when
returning the result of COUNT(*). Thanks to Georg Ringer.

Fixes: #13151

Change-Id: I40f0c675dea56949b154fbc1f29b32f25d2ca4cc

typo3/sysext/extbase/Classes/Persistence/Storage/Typo3DbBackend.php

index fb901b9..f0cab31 100644 (file)
@@ -274,7 +274,7 @@ class Tx_Extbase_Persistence_Storage_Typo3DbBackend implements Tx_Extbase_Persis
                        $count = current(current($rows));
                }
                $this->databaseHandle->sql_free_result($result);
-               return $count;
+               return (int)$count;
        }
 
        /**