aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/entities.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib/entities.php')
-rw-r--r--engine/lib/entities.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/engine/lib/entities.php b/engine/lib/entities.php
index a18e1c612..3b3830948 100644
--- a/engine/lib/entities.php
+++ b/engine/lib/entities.php
@@ -1808,10 +1808,18 @@ function elgg_get_entities(array $options = array()) {
'joins' => array()
);
-
$options = array_merge($defaults, $options);
- $singulars = array('type', 'subtype', 'owner_guid', 'container_guid', 'site_guid', 'type_subtype_pair');
+ // can't use helper function with type_subtype_pair because it's already an array...just need to merge it
+ if (isset($options['type_subtype_pair'])) {
+ if (isset($options['type_subtype_pairs'])) {
+ $options['type_subtype_pairs'] = array_merge($options['type_subtype_pairs'], $options['type_subtype_pair']);
+ } else {
+ $options['type_subtype_pairs'] = $options['type_subtype_pair'];
+ }
+ }
+
+ $singulars = array('type', 'subtype', 'owner_guid', 'container_guid', 'site_guid');
$options = elgg_normalise_plural_options_array($options, $singulars);
// evaluate where clauses