mirror of https://github.com/MISP/MISP
fix: [sync] if push rules don't have the type_attributes set, don't throw an error
parent
0b49d329e8
commit
ed7555f0e7
|
@ -1058,7 +1058,11 @@ class Event extends AppModel
|
|||
// prepare attribute for sync
|
||||
if (!empty($data['Attribute'])) {
|
||||
foreach ($data['Attribute'] as $key => $attribute) {
|
||||
if (!empty(Configure::read('MISP.enable_synchronisation_filtering_on_type')) && in_array($attribute['type'], $pushRules['type_attributes']['NOT'])) {
|
||||
if (
|
||||
!empty(Configure::read('MISP.enable_synchronisation_filtering_on_type')) &&
|
||||
!empty($pushRules['type_attributes']['NOT']) &&
|
||||
in_array($attribute['type'], $pushRules['type_attributes']['NOT'])
|
||||
) {
|
||||
unset($data['Attribute'][$key]);
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue