mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-24 06:03:49 +00:00
Merge "Bug 43011 - AbuseFilter: Invalid argument supplied for foreach"
This commit is contained in:
commit
d6ae1d4576
|
@ -1777,12 +1777,13 @@ class AbuseFilter {
|
|||
# Process actions
|
||||
$actions_raw = unserialize( $row->afh_actions );
|
||||
$actions_output = array();
|
||||
|
||||
foreach ( $actions_raw as $action => $parameters ) {
|
||||
$actions_output[$action] = array(
|
||||
'action' => $action,
|
||||
'parameters' => $parameters
|
||||
);
|
||||
if ( is_array( $actions_raw ) ) {
|
||||
foreach ( $actions_raw as $action => $parameters ) {
|
||||
$actions_output[$action] = array(
|
||||
'action' => $action,
|
||||
'parameters' => $parameters
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return array( $af_row, $actions_output );
|
||||
|
|
Loading…
Reference in a new issue