elgg_get_entities() not bailing when a where helper function returns false
|Reported by:||brettp||Owned by:||brettp|
The original plan for ege() and friends was to return false if invalid options were passed (eg, 'container_guid' => 'abc'). This would be detected by if any of the helper functions returned false instead of a where clause.
There wheres are run through array_unique() first to remove duplicates. array_unique() considers false and ' ' to be the same, so instead of bailing, ege() has been letting some of the invalid calls continue if an empty string happens to be before the false.
We can't not change it because it's inconsistent, so do we implement it how I originally planned and potentially break poorly written code, or do we have invalid options silently ignored? The difference is getting false vs getting all entities.
Change History (6)
comment:5 Changed 20 months ago by Brett Profitt
- Resolution set to fixed
- Status changed from assigned to closed