The doxygen function documentation for module_invoke() lists both
$module as parameters, but these are currently retrieved with
func_get_args() rather than being declared in the function definition. Adding the parameters to the function definitions would make them more self-documenting and would also provide more meaningful error messages when the correct parameters are not passed.
The same is true of module_invoke_all() for its
$hook parameters are already documented in the functions' docblocks.
User interface changes
The documented signatures for
module_invoke_all() would technically change, but there would be no functional change since both use
func_get_args(). (These functions already trigger errors when the
$module arguments are not passed.)
This change could be backported to D7 and even D6.
Original report by @tim.plunkett
Looking at module_invoke, I don't understand why $module and $hook aren't in the function definition.
I'm expecting there is a reason why this isn't done, but if so, can we document why it is done this way?
This would also make things break cleaner if someone tried to call