Array_walk and the userdata variable.
I have a horrible issue with the userdata variable. As it is defined, it does not accept something by reference, leaving me only capable of modifying the original array that I pass to it.
Previously you could have done this:
array_walk($owners, 'OwnerOutput::generate_owner_list', &$output)
array_walk($owners, 'OwnerOutput::generate_owner_list', array(&array_walk($owners, 'OwnerOutput::generate_owner_list', array(&$output));
Unfortunately, this does not work anymore. I understand that I can simply modify owners if I wanted to, but I’d much rather keep the text output in $output and owners in $owners.
The solution to this is absurd, but it works:
array_walk($owners, 'OwnerOutput::generate_owner_list', array(&$output));
You need to modify the generate_owner_list function, but otherwise this works and the output is all in the right place.