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

Fixed Possible bug in XenForo_Dependencies_Abstract::preLoadData()

Discussion in 'Resolved Bug Reports' started by Shadab, Jan 6, 2011.

  1. Shadab

    Shadab Well-Known Member

    Lines 176 - 178

    XenForo_CodeEvent::fire('init_dependencies', array($this$data));
    Please consider changing _handleCustomPreloadedData() to accept the $data array by reference. In its current form, any missing data that gets preloaded via this method in a child class (XenForo_Dependencies_Public, for example) isn't reflected in the original $data array which gets passed to the event handlers for init_dependencies.

    This is not an issue most of the time because whatever data that needs to be preloaded is usually present in the data registry.
    Digital Doctor, Vincent and ragtek like this.
  2. Mike

    Mike XenForo Developer Staff Member

    I'm curious what you're manipulating, though based on the previous report, I'm guessing it has to do with route prefixes, so that makes sense. And the change simply exposes some more accurate data to the event, so it's worth while.
  3. Shadab

    Shadab Well-Known Member

    Yeah, that was the reason (changing route prefixes via init_dependencies).
    Thanks again!

Share This Page