Hooks.php: Check for non-array $tags

Bug: T302918
Change-Id: I96fdbbc443025d9461dc168e58164004a0f8d7ed
This commit is contained in:
Subramanya Sastry 2022-03-02 14:39:37 -06:00
parent 5b154ffb67
commit b08fd17186

View file

@ -146,6 +146,12 @@ class Hooks {
UserIdentity $user,
&$tags
) {
// This is just a stop-gap to deal with callers that aren't complying
// with the advertised hook signature.
if ( !is_array( $tags ) ) {
return;
}
if (
in_array( "mw-blank", $tags ) ||
( in_array( "mw-contentmodelchange", $tags ) &&