Duplicate check for array_diff

Currently, array_diff is only performed in one direction. This way, some
edits to tags (and, in future, to custom block durations) aren't catched
and the filter isn't saved.

Bug: T180194
Change-Id: I22fb9368208380c1a8205a566ac5ff07bbb6e05b
This commit is contained in:
Daimona Eaytoy 2018-03-04 19:26:50 +01:00
parent d138b2877c
commit 603b020239

View file

@ -2069,8 +2069,11 @@ class AbuseFilter {
// They're both unset
} elseif ( isset( $actions1[$action] ) && isset( $actions2[$action] ) ) {
// They're both set.
// Double check needed, e.g. per T180194
if ( array_diff( $actions1[$action]['parameters'],
$actions2[$action]['parameters'] ) ) {
$actions2[$action]['parameters'] ) ||
array_diff( $actions2[$action]['parameters'],
$actions1[$action]['parameters'] ) ) {
// Different parameters
$differences[] = 'actions';
}