1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fixed Load XFCP error in online page if an addon extends controller

Discussion in 'Resolved Bug Reports' started by sonnb, Sep 21, 2013.

  1. sonnb

    sonnb Well-Known Member

    If an addon extends a controller, session will probably write the extended class. When open online page, session will load the function
    public function addSessionActivityDetailsToList(array $activities)
    To load list of viewing page. In this function XF already made an catch function to catch this case:
    foreach ($controllerGroups AS $controller => $controllerGroup)
    $controller XenForo_Application::resolveDynamicClass($controller'controller');
    $canLoad = ($controller && XenForo_Application::autoload($controller));
                catch (
    XenForo_Exception $e) {} // likely an XFCP autoload error - skip this
    But function
    already call XenForo_Application::autoload, so exception will be raised before this function can check for $canLoad.
    Adam Howard likes this.
  2. Mike

    Mike XenForo Developer Staff Member

    I've sorted the error here by moving both into the exception. However, this error isn't intrinsic to extending controllers. The error, IIRC, only happens if you use responseReroute with get_class/__CLASS_ in an XFCP class. In those cases, you should use the original class name and it should work correctly.
    sonnb likes this.
  3. sonnb

    sonnb Well-Known Member

    You are correct. I forgot that part.
    Last edited: Sep 23, 2013

Share This Page