ViewEdit: account for empty actions in imported data

Empty actions are JSONified as [], not {}, hence they're not objects.

Bug: T252181
Change-Id: Ieb5e315ad87bd3a489ade26f5f0dd202810ae896
This commit is contained in:
Daimona Eaytoy 2020-05-08 14:26:12 +02:00
parent 36a0f41873
commit 8a7a576cb0

View file

@ -1393,7 +1393,7 @@ class AbuseFilterViewEdit extends AbuseFilterView {
return false;
}
if ( !is_object( $arr['row'] ) || !is_object( $arr['actions'] ) ) {
if ( !is_object( $arr['row'] ) || !( is_object( $arr['actions'] ) || $arr['actions'] === [] ) ) {
return false;
}