This returns false:
elgg_get_entities(array("subtype" => 34))
and is very strange because such entities definitely exist in the database... filtering by other things (for example container_id) works...
what is the explanation for this? thank you
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by Raül Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Justin@justinrixx
Justin - 0 likes
- Paweł Sroka@srokap
Paweł Sroka - 0 likes
You must log in to post replies.Have you tried using the subtype string rather than the integer code?
What does your object return when you call $object->getSubtype()? It ought to be a string; I'm no expert, but when I search for objects based on subtype, I use the string value.
Justin is right, you should use subtype string name (check subtypes table when in doubt), or key subtypes and array of names for multiple subtypes.
It always helps to have a look at function doc block for basic examples (same available here: http://reference.elgg.org/entities_8php.html#af085c8362e49c4f52d4f1fcf58ca6fb8)
Generally you shouldn't ever hardcode ids of any table as they will change for every new install. That's why we use string names here.