Looks like we have some incorrect variable reuse/clashing
public static function onEditFilterMergedContent( $context, $content, $status, $summary ) { $title = $context->getTitle(); if ( !$title->inNamespace( NS_GADGET_DEFINITION ) ) { return true; } if ( !$content instanceof GadgetDefinitionContent ) { // This should not be possible? throw new Exception( "Tried to save non-GadgetDefinitionContent to {$title->getPrefixedText()}" ); } $status = $content->validate(); if ( !$status->isGood() ) { $status->merge( $status ); return false; } return true; }
Specifically, $status->merge( $status ); -- How can you merge the object into itself? I'm guessing $status = $content->validate(); should be something like $status2 and then if it's not good, merging one into the other
$status2 = $content->validate(); if ( !$status2->isGood() ) { $status->merge( $status2 ); return false; }
Introduced by @Legoktm and @kaldari in https://github.com/wikimedia/mediawiki-extensions-Gadgets/commit/519f30355ec2677ce8c2872bd2688bf1159c08ff it seems