mirror of https://github.com/MISP/MISP
fix: [relatedEvent:view] catch if number of correlation cannot be found
parent
ea7329063f
commit
96bc938ae1
|
@ -1086,7 +1086,6 @@ class EventsController extends AppController
|
|||
}
|
||||
$event = $results[0];
|
||||
|
||||
|
||||
$attributeTagsName = $this->Event->Attribute->AttributeTag->extractAttributeTagsNameFromEvent($event, 'both');
|
||||
$this->set('attributeTags', array_values($attributeTagsName['tags']));
|
||||
$this->set('attributeClusters', array_values($attributeTagsName['clusters']));
|
||||
|
|
|
@ -18,7 +18,10 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td style="line-height: 14px; padding-left: 2px;">
|
||||
<i><?php echo h($related['date']); ?></i><b style="margin-left: 5px; float: right;" title="<?php echo __(sprintf('This related event contains %s unique correlation(s)', h($relatedEventCorrelationCount[$related['id']]))); ?>"> <?php echo h($relatedEventCorrelationCount[$related['id']]) ?></b>
|
||||
<i><?php echo h($related['date']); ?></i>
|
||||
<?php if (isset($relatedEventCorrelationCount[$related['id']])): ?>
|
||||
<b style="margin-left: 5px; float: right;" title="<?php echo __(sprintf('This related event contains %s unique correlation(s)', h($relatedEventCorrelationCount[$related['id']]))); ?>"> <?php echo h($relatedEventCorrelationCount[$related['id']]) ?></b>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
|
|
@ -104,6 +104,7 @@
|
|||
<li class="<?php echo $i > $display_threshold ? 'correlation-expanded-area' : ''; ?>" style="<?php echo $i > $display_threshold ? 'display: none;' : ''; ?>">
|
||||
<?php echo $this->element('/Events/View/related_event', array(
|
||||
'related' => $relatedEvent['Event'],
|
||||
'relatedEventCorrelationCount' => array(),
|
||||
'href_url' => $baseurl . '/servers/previewEvent/' . $server['Server']['id']
|
||||
)); ?>
|
||||
</li>
|
||||
|
|
Loading…
Reference in New Issue