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

Fixed "Moderation Queue" doesn't get rebuilt when key is missing in Data Registry

Discussion in 'Resolved Bug Reports' started by Shadab, Dec 8, 2010.

  1. Shadab

    Shadab Well-Known Member

    If the "moderationCounts" key is missing from the data registry, it doesn't get rebuilt when _updateModeratorSessionCaches() is called in the abstract public controller. (executed on each page load)

    In XenForo_Dependencies_Public::_handleCustomPreloadedData(), we have:
    which sets the moderationCounts to null, in case the data is missing.
    And in XenForo_ControllerPublic_Abstract::_updateModeratorSessionModerationCounts(), we have:
            if (XenForo_Application::isRegistered('moderationCounts'))
    which always returns true (because it seems it doesn't check for null values). This prevents the cache from being rebuilt. I believe this is a bug; even though I can't find any situation where this data registry key gets deleted (except when running a delete query manually).
  2. Mike

    Mike XenForo Developer Staff Member

    The same logic seems to apply to report counts too. They'll now only be registered if they're arrays.
    Shadab likes this.

Share This Page