X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FuserOptions.php;h=2f8941f3daac14f171130be2c24e1453c2c39735;hb=e65f8ac5110804067366f9f239c13f4f29b66c3d;hp=eb8da57e86a860672c738ef3dd1eb0acc898caba;hpb=6f680554ceb988f3895184167d5006d722a0afb3;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/userOptions.php b/maintenance/userOptions.php index eb8da57e86..2f8941f3da 100644 --- a/maintenance/userOptions.php +++ b/maintenance/userOptions.php @@ -107,16 +107,13 @@ The new option is NOT validated.' ); $userValue = $user->getOption( $option ); if ( $userValue <> $defaultOptions[$option] ) { - // phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged - @$ret[$option][$userValue]++; + $ret[$option][$userValue] = ( $ret[$option][$userValue] ?? 0 ) + 1; } } else { - foreach ( $defaultOptions as $name => $defaultValue ) { $userValue = $user->getOption( $name ); if ( $userValue != $defaultValue ) { - // phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged - @$ret[$name][$userValue]++; + $ret[$name][$userValue] = ( $ret[$name][$userValue] ?? 0 ) + 1; } } } @@ -199,5 +196,5 @@ WARN } } -$maintClass = 'UserOptionsMaintenance'; +$maintClass = UserOptionsMaintenance::class; require RUN_MAINTENANCE_IF_MAIN;