simplify control structures

* extract common parts from if-else branches
* convert redundante elseif to else
This commit is contained in:
2024-03-24 17:39:25 +01:00
parent c88d716dfc
commit 9903a6163d
2 changed files with 5 additions and 6 deletions

View File

@ -186,7 +186,7 @@ class StatifyBlacklist_System extends StatifyBlacklist {
);
} elseif ( ! isset( $options['ua']['blacklist'] ) ) {
$options['ua']['blacklist'] = array();
} elseif ( isset( $options['ua'] ) ) {
} else {
// User agent strings got stored incorrectly in 1.6.0 - luckily the version was not updated, either.
$options['ua']['blacklist'] = array_flip( $options['ua']['blacklist'] );
}