From 90f5e694f6e7005f35297f9493f5caeedcf25a8c Mon Sep 17 00:00:00 2001 From: Brett Profitt Date: Wed, 28 Sep 2011 22:05:31 -0700 Subject: Fixes #3713. elgg_get_entities() and friends return false if passed invalid options. --- engine/lib/entities.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'engine/lib/entities.php') diff --git a/engine/lib/entities.php b/engine/lib/entities.php index cea8af1da..abf7395e7 100644 --- a/engine/lib/entities.php +++ b/engine/lib/entities.php @@ -846,9 +846,6 @@ function elgg_get_entities(array $options = array()) { $wheres[] = elgg_get_entity_time_where_sql('e', $options['created_time_upper'], $options['created_time_lower'], $options['modified_time_upper'], $options['modified_time_lower']); - // remove identical where clauses - $wheres = array_unique($wheres); - // see if any functions failed // remove empty strings on successful functions foreach ($wheres as $i => $where) { @@ -859,6 +856,9 @@ function elgg_get_entities(array $options = array()) { } } + // remove identical where clauses + $wheres = array_unique($wheres); + // evaluate join clauses if (!is_array($options['joins'])) { $options['joins'] = array($options['joins']); -- cgit v1.2.3