mirror of https://github.com/MISP/MISP
fix: [json converter] fixed an issue if an expected key was not found
- was only accessible due to another bug, but it's more graceful either waypull/5871/head
parent
37c5684e79
commit
5ccf914278
|
@ -45,10 +45,12 @@ class JSONConverterTool
|
|||
unset($event['Event']['SharingGroup']);
|
||||
}
|
||||
if ($object == 'Galaxy') {
|
||||
foreach ($event['Event']['Galaxy'] as $k => $galaxy) {
|
||||
foreach ($galaxy['GalaxyCluster'] as $k2 => $cluster) {
|
||||
if (empty($cluster['meta'])) {
|
||||
$event['Event']['Galaxy'][$k]['GalaxyCluster'][$k2]['meta'] = new stdclass();
|
||||
if (!empty($event['Event']['Galaxy'])) {
|
||||
foreach ($event['Event']['Galaxy'] as $k => $galaxy) {
|
||||
foreach ($galaxy['GalaxyCluster'] as $k2 => $cluster) {
|
||||
if (empty($cluster['meta'])) {
|
||||
$event['Event']['Galaxy'][$k]['GalaxyCluster'][$k2]['meta'] = new stdclass();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue