Getting the following error for an invalid callback is not helpful:
Warning: Invalid argument: function: class not found in
/includes/registration/ExtensionRegistry.php on line 335
Change-Id: I4dfc011cb0a5cd06f1836d73e58f407d468e4546
}
foreach ( $info['callbacks'] as $name => $cb ) {
+ if ( !is_callable( $cb ) ) {
+ if ( is_array( $cb ) ) {
+ $cb = '[ ' . implode( ', ', $cb ) . ' ]';
+ }
+ throw new UnexpectedValueException( "callback '$cb' is not callable" );
+ }
call_user_func( $cb, $info['credits'][$name] );
}
}