SimpleMachines/SMF2.1 — pull request #2240 by MissAllSunday (2014-09-04 19:59:18+00:00)
Title: Make call_helper to also support closures

This is a tricky one, haven't realize that you could also pass a closure to call_helper but its more common that I imagined, usage of createList() heavily relies on closures.

In theory this should sufice to detect any closure and just return the object, downside of this is the case when create_function() is used but since we're now on 5.3, modders shouldn't really use that anyway.

I'm tempted to change the && for a || just in case someone passes an already instantiated method as a var:

$var = $this->foo();

call_helper($var);

Signed-off-by: Suki