From 73781d381679d7ab4fdf700b73cb0bdbd68bd6b1 Mon Sep 17 00:00:00 2001 From: Brad Jorsch Date: Tue, 27 Feb 2018 16:08:02 -0500 Subject: [PATCH] Add a missing check of $wgActorTableSchemaMigrationStage We shouldn't be trying to update the table when it's MIGRATION_OLD. Bug: T188437 Change-Id: Id5aae5eaafc36bf7e65009e67fe91619fb1df295 --- includes/user/User.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/includes/user/User.php b/includes/user/User.php index babb571c94..3102cfcf10 100644 --- a/includes/user/User.php +++ b/includes/user/User.php @@ -4237,6 +4237,8 @@ class User implements IDBAccessObject, UserIdentity { $dbw = wfGetDB( DB_MASTER ); $dbw->doAtomicSection( __METHOD__, function ( $dbw, $fname ) use ( $newTouched ) { + global $wgActorTableSchemaMigrationStage; + $dbw->update( 'user', [ /* SET */ 'user_name' => $this->mName, @@ -4263,12 +4265,14 @@ class User implements IDBAccessObject, UserIdentity { ); } - $dbw->update( - 'actor', - [ 'actor_name' => $this->mName ], - [ 'actor_user' => $this->mId ], - $fname - ); + if ( $wgActorTableSchemaMigrationStage > MIGRATION_OLD ) { + $dbw->update( + 'actor', + [ 'actor_name' => $this->mName ], + [ 'actor_user' => $this->mId ], + $fname + ); + } } ); $this->mTouched = $newTouched; -- 2.20.1