You can find more information here:
https://community.elgg.org/discussion/view/1828790/hhvm-and-elgg
@David I´ve my Elgg 1.10 working with the lastest HHVM release and for now it works ok. If you have NGINX maybe I can help you. If your instalation is for a production site you should take some precautions due to HHVM instability.
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.
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.