The valid_tags table was added in MW 1.15 and removed in 1.33. If
someone is trying to upgrade from a really old version of MediaWiki,
valid_tags may not exist even though change_tags.ct_tag does.
Bug: T230317
Change-Id: Ib94542878b8d301c1d7f806405ee39838ebc6d4a
private function setUserDefinedTags() {
$dbr = $this->lbFactory->getMainLB()->getConnection( DB_REPLICA );
- $userTags = $dbr->selectFieldValues(
- 'valid_tag',
- 'vt_tag',
- [],
- __METHOD__
- );
+ $userTags = null;
+ if ( $dbr->tableExists( 'valid_tag' ) ) {
+ $userTags = $dbr->selectFieldValues(
+ 'valid_tag',
+ 'vt_tag',
+ [],
+ __METHOD__
+ );
+ }
if ( empty( $userTags ) ) {
$this->output( "No user defined tags to set, moving on...\n" );