skins: Make the SidebarBeforeOutput hook non-abortable

False return value previously aborted processing of the hook for othe
extensions that are loaded after the extension that aborted.

Bug: T255444
Change-Id: I6a449b242f0667003909f87ea5063f13e501929e
This commit is contained in:
Ammar Abdulhamid 2020-06-17 01:29:38 +01:00 committed by Krinkle
parent 089d052afb
commit 0d73512874
2 changed files with 6 additions and 5 deletions

View file

@ -3483,10 +3483,11 @@ class HookRunner implements
);
}
public function onSidebarBeforeOutput( $skin, &$sidebar ) {
return $this->container->run(
public function onSidebarBeforeOutput( $skin, &$sidebar ) : void {
$this->container->run(
'SidebarBeforeOutput',
[ $skin, &$sidebar ]
[ $skin, &$sidebar ],
[ 'abortable' => false ]
);
}

View file

@ -18,7 +18,7 @@ interface SidebarBeforeOutputHook {
*
* @param Skin $skin
* @param array &$sidebar Sidebar content. Modify $sidebar to add or modify sidebar portlets.
* @return bool|void True or no return value to continue or false to abort
* @return void This hook must not abort; it must not return value.
*/
public function onSidebarBeforeOutput( $skin, &$sidebar );
public function onSidebarBeforeOutput( $skin, &$sidebar ): void;
}