Reuse SpecialVersions arrayToString (made it explicitly public!) in an array_amp for the formatting of arrays/objects (Yay for all the different ways we accept things ;P)
foreach ( $myWgHooks as $hook => $hooks ) {
$arr = array(
'name' => $hook,
- 'subscribers' => $hooks,
+ 'subscribers' => array_map( array( 'SpecialVersion', 'arrayToString' ), $hooks ),
);
$this->getResult()->setIndexedTagName( $arr['subscribers'], 's' );
*
* @return Mixed
*/
- static function arrayToString( $list ) {
- if( is_array( $list ) && count( $list ) == 1 )
+ public static function arrayToString( $list ) {
+ if( is_array( $list ) && count( $list ) == 1 ) {
$list = $list[0];
+ }
if( is_object( $list ) ) {
$class = get_class( $list );
return "($class)";