Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions LocalSettings.php
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -3008,4 +3008,19 @@ function wfHandleDeletedWiki() {
$wgLocalisationCacheConf['manualRecache'] = false;
}

// Workaround: GlobalBlocking registers block action IDs via onGetAllBlockActions that collide
// with IDs added to CORE_BLOCK_ACTIONS in MediaWiki 1.45. Deduplicate by keeping the first
// (core) occurrence of each integer ID so Special:Block does not throw UnexpectedValueException.
// TODO: Remove once GlobalBlocking is updated to use non-conflicting IDs.
$wgHooks['GetAllBlockActions'][] = static function ( array &$actions ): void {
$seen = [];
foreach ( $actions as $name => $id ) {
if ( isset( $seen[$id] ) ) {
unset( $actions[$name] );
} else {
$seen[$id] = true;
}
}
};

unset( $wi );