X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=maintenance%2FuserOptions.php;h=2f8941f3daac14f171130be2c24e1453c2c39735;hp=4c9dcb4667373ba8d0fa38706494f90a51621825;hb=e65f8ac5110804067366f9f239c13f4f29b66c3d;hpb=77e3624caba072521fbc1826af2d47f9b29f4032 diff --git a/maintenance/userOptions.php b/maintenance/userOptions.php index 4c9dcb4667..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; } } }