When a hook neglects to return a value, Hooks::run throws an MWException with the message "Detected bug in an extension! Hook $func failed to return a value; should return true to continue hook processing or false to abort."
This is a frustrating gotcha that has caused us some serious in the past (see bug 49727 for a recent example). Most hook handlers are written with the intent of complementing or augmenting core functionality rather than vetoing it, making it quite natural for a developer to forget that the caller is waiting for permission to proceed. The potential for confusion is magnified by the fact that DOM event handlers and jQuery event handlers are not required to return an explicit value for the handled event to continue propagating.
We should tolerate implicit and explicit null return values from hook handlers. Making this change should not break anything, as any hook handler currently returning null is treated as an error.
--------------------------
**Version**: 1.22.0
**Severity**: normal