Merge "Follow-up I6a02042f: Ensure reason is always a string"

This commit is contained in:
jenkins-bot 2023-06-07 16:52:16 +00:00 committed by Gerrit Code Review
commit c610b5abc8

View file

@ -177,7 +177,8 @@ class CreateAndPromote extends Maintenance {
$userGroupManager = $services->getUserGroupManager();
$oldGroups = $userGroupManager->getUserGroups( $user );
$userGroupManager->addUserToMultipleGroups( $user, $promotions );
$this->addLogEntry( $user, $oldGroups, array_merge( $oldGroups, $promotions ), $this->getOption( 'reason' ) );
$reason = $this->getOption( 'reason' ) ?: '';
$this->addLogEntry( $user, $oldGroups, array_merge( $oldGroups, $promotions ), $reason );
if ( !$exists ) {
# Increment site_stats.ss_users