mboudet пре 6 година
родитељ
комит
9f0da0bbd9
1 измењених фајлова са 4 додато и 1 уклоњено
  1. 4 1
      tripal/includes/TripalFieldQuery.inc

+ 4 - 1
tripal/includes/TripalFieldQuery.inc

@@ -124,7 +124,10 @@ class TripalFieldQuery extends EntityFieldQuery {
       if (is_numeric($results)) {
         return $results;
       }
-      return count($results['TripalEntity']);
+      if (array_key_exists('TripalEntity', $results)) {
+        return count($results['TripalEntity']);
+      }
+      return 0;
     }
     return $results;
   }