dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
build: Upgrade mediawiki-codesniffer from 26.0.0 to 28.0.0
[lhc/web/wiklou.git]
/
maintenance
/
userOptions.php
diff --git
a/maintenance/userOptions.php
b/maintenance/userOptions.php
index
7cf16b6
..
2f8941f
100644
(file)
--- a/
maintenance/userOptions.php
+++ b/
maintenance/userOptions.php
@@
-102,23
+102,18
@@
The new option is NOT validated.' );
// Get the options and update stats
if ( $option ) {
if ( !array_key_exists( $option, $defaultOptions ) ) {
// Get the options and update stats
if ( $option ) {
if ( !array_key_exists( $option, $defaultOptions ) ) {
- $this->
error( "Invalid user option. Use --list to see valid choices\n", 1
);
+ $this->
fatalError( "Invalid user option. Use --list to see valid choices\n"
);
}
$userValue = $user->getOption( $option );
if ( $userValue <> $defaultOptions[$option] ) {
}
$userValue = $user->getOption( $option );
if ( $userValue <> $defaultOptions[$option] ) {
- // @codingStandardsIgnoreStart Ignore silencing errors is discouraged warning
- @$ret[$option][$userValue]++;
- // @codingStandardsIgnoreEnd
+ $ret[$option][$userValue] = ( $ret[$option][$userValue] ?? 0 ) + 1;
}
} else {
}
} else {
-
foreach ( $defaultOptions as $name => $defaultValue ) {
$userValue = $user->getOption( $name );
if ( $userValue != $defaultValue ) {
foreach ( $defaultOptions as $name => $defaultValue ) {
$userValue = $user->getOption( $name );
if ( $userValue != $defaultValue ) {
- // @codingStandardsIgnoreStart Ignore silencing errors is discouraged warning
- @$ret[$name][$userValue]++;
- // @codingStandardsIgnoreEnd
+ $ret[$name][$userValue] = ( $ret[$name][$userValue] ?? 0 ) + 1;
}
}
}
}
}
}
@@
-201,5
+196,5
@@
WARN
}
}
}
}
-$maintClass =
'UserOptionsMaintenance'
;
+$maintClass =
UserOptionsMaintenance::class
;
require RUN_MAINTENANCE_IF_MAIN;
require RUN_MAINTENANCE_IF_MAIN;