$user = User::newFromName( $userName );
}
if ( !$user ) {
- $this->error( "Invalid username", true );
+ $this->fatalError( "Invalid username" );
}
// @todo FIXME: This is reset 7 lines down.
$t = Title::newFromText( $this->getArg() );
if ( !$t ) {
- $this->error( "Invalid title", true );
+ $this->fatalError( "Invalid title" );
}
$restrictions = [];
}
}
-$maintClass = "Protect";
+$maintClass = Protect::class;
require_once RUN_MAINTENANCE_IF_MAIN;