aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine/lib/entities.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/engine/lib/entities.php b/engine/lib/entities.php
index f7ae108ed..dbb5ee695 100644
--- a/engine/lib/entities.php
+++ b/engine/lib/entities.php
@@ -2147,8 +2147,13 @@ function elgg_list_registered_entities(array $options = array()) {
}
}
- $count = elgg_get_entities(array_merge(array('count' => TRUE), $options));
- $entities = elgg_get_entities($options);
+ if (!empty($options['type_subtype_pairs'])) {
+ $count = elgg_get_entities(array_merge(array('count' => TRUE), $options));
+ $entities = elgg_get_entities($options);
+ } else {
+ $count = 0;
+ $entities = array();
+ }
return elgg_view_entity_list($entities, $count, $options['offset'],
$options['limit'], $options['full_view'], $options['list_type_toggle'], $options['pagination']);