[+TASK] Extbase (Persistence): Added type check before invoking count().
authorJochen Rau <j.rau@web.de>
Tue, 30 Mar 2010 09:28:32 +0000 (09:28 +0000)
committerJochen Rau <j.rau@web.de>
Tue, 30 Mar 2010 09:28:32 +0000 (09:28 +0000)
typo3/sysext/extbase/Classes/Persistence/Backend.php

index aae8e41..14a33fe 100644 (file)
@@ -736,7 +736,7 @@ class Tx_Extbase_Persistence_Backend implements Tx_Extbase_Persistence_BackendIn
                );
 
                $relationTableMatchFields = $columnMap->getRelationTableMatchFields();
-               if (count($relationTableMatchFields)) {
+               if (is_array($relationTableMatchFields) && count($relationTableMatchFields) > 0) {
                        $relationMatchFields = array_merge($relationTableMatchFields,$relationMatchFields);
                }