Elgg/Elgg — pull request #5558 by jeabakker (2013-05-30 11:06:27+00:00)
Title: elgg_instanceof can crash easily

If a non Entity is provided to elgg_instanceof and $type or $subtype is set the function will crash.

example:
$entity = get_entity(0);
elgg_instanceof($entity, 'object', 'blog');
this will crash the page.

also my PR improves some logic to don't do unnecessary checks