The problem is in BlockListPager::preprocessResults:
foreach ( $this->restrictions as $restriction ) { if ( $restriction->getType() === PageRestriction::TYPE ) { '@phan-var PageRestriction $restriction'; $title = $restriction->getTitle(); if ( $title !== null ) { $lb->addObj( $title ); } } }
$restriction->getTitle(); can return false, and calling $lb->addObj( false ) causes an error when addObj asserts the type. This assertion was added recently and is only in master as of yet: https://gerrit.wikimedia.org/r/c/mediawiki/core/+/682144/3/includes/cache/LinkBatch.php
I'd expect production errors if we don't fix this before the next branch cut.
We should ensure that we only ever pass a LinkTarget to LinkBatch::addObj.