Hooks::isRegistered() doesn't consider hooks in $wgHooks.
Until that is fixed (see I39bd5de2), we need to check that explicitely.
Change-Id: I211c0c8bd0cd618151e56a11171ec8feef328d16
* @return Boolean True if no handler aborted the hook
*/
public static function runLegacyHooks( $event, $args = array(), $warn = true ) {
- if ( !Hooks::isRegistered( $event ) ) {
+ global $wgHooks; //@todo: once I39bd5de2 is merged, direct access to $wgHooks is no longer needed.
+
+ if ( !Hooks::isRegistered( $event ) && empty( $wgHooks[$event] ) ) {
return true; // nothing to do here
}