aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/metastrings.php
diff options
context:
space:
mode:
authorBrett Profitt <brett.profitt@gmail.com>2011-09-28 22:05:31 -0700
committerBrett Profitt <brett.profitt@gmail.com>2011-09-28 22:05:31 -0700
commit90f5e694f6e7005f35297f9493f5caeedcf25a8c (patch)
tree26d960c24368e3cf212be08eaa2f27f843025872 /engine/lib/metastrings.php
parent700ae307bd2bc698f60ffd02afcc87aaff9f74e5 (diff)
downloadelgg-90f5e694f6e7005f35297f9493f5caeedcf25a8c.tar.gz
elgg-90f5e694f6e7005f35297f9493f5caeedcf25a8c.tar.bz2
Fixes #3713. elgg_get_entities() and friends return false if passed invalid options.
Diffstat (limited to 'engine/lib/metastrings.php')
-rw-r--r--engine/lib/metastrings.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/engine/lib/metastrings.php b/engine/lib/metastrings.php
index d444121d0..8c00fb2ad 100644
--- a/engine/lib/metastrings.php
+++ b/engine/lib/metastrings.php
@@ -360,9 +360,6 @@ function elgg_get_metastring_based_objects($options) {
$wheres[] = elgg_get_guid_based_where_sql('n_table.owner_guid',
$options['metastring_owner_guids']);
- // remove identical where clauses
- $wheres = array_unique($wheres);
-
// see if any functions failed
// remove empty strings on successful functions
foreach ($wheres as $i => $where) {
@@ -373,6 +370,9 @@ function elgg_get_metastring_based_objects($options) {
}
}
+ // remove identical where clauses
+ $wheres = array_unique($wheres);
+
// evaluate join clauses
if (!is_array($options['joins'])) {
$options['joins'] = array($options['joins']);