Fixed  Possible bug in XenForo_Dependencies_Abstract::preLoadData()


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.


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.


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