The maintenance script might be run to clean up users with no ID in the
`revision` table even after the other tables have had the ID and name
fields removed (in favor of the actor ID fields). Handle this situation
so as to not error out.
Bug: T238043
Change-Id: Ie84dab4218d816106bf4b0e61f020148730220f0
(cherry picked from commit
f5b78e9c313d8c54cffe61cc24fe82367b023d31)
return;
}
+ $dbw = $this->getDB( DB_MASTER );
+ if ( !$dbw->fieldExists( $table, $idField ) ||
+ !$dbw->fieldExists( $table, $nameField )
+ ) {
+ $this->output( "Skipping $table, fields $idField and/or $nameField do not exist\n" );
+ return;
+ }
+
$primaryKey = (array)$primaryKey;
$pkFilter = array_flip( $primaryKey );
- $this->output(
- "Beginning cleanup of $table\n"
- );
+ $this->output( "Beginning cleanup of $table\n" );
- $dbw = $this->getDB( DB_MASTER );
$next = '1=1';
$countAssigned = 0;
$countPrefixed = 0;