Fixed  Possible bug in XenForo_Dependencies_Abstract::preLoadData()

Shadab

Well-known member
Lines 176 - 178
PHP:
		$this->_handleCustomPreloadedData($data);

		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.
 
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.
 
Top Bottom