[RSS Feed/News] \XF::asVisitor() should take a callable instead of a \Closure

Status
Not open for further replies.

XenForo

Administrative
  • Thread starter
  • Admin
  • #1
As of 2.2.4, the signature of \XF::asVisitor is:
PHP:

public static function asVisitor(\XF\Entity\User $user, \Closure $action, bool $withLanguage = false)

However, asVisitor doesn't actually require that $action be a Closure; it can handle any callable. I don't see any reason to limit it to Closure.

ادامه مطلب...
 
Status
Not open for further replies.
Back
Top Bottom