mirror of https://github.com/MISP/MISP
fix: Incorrect directionality for oldest_timestamp comparisons
parent
17bb03193b
commit
ef4b663b8c
|
@ -1309,7 +1309,7 @@ class EventsController extends AppController
|
||||||
foreach ($event['Object'] as $k => $object) {
|
foreach ($event['Object'] as $k => $object) {
|
||||||
if (!empty($object['Attribute'])) {
|
if (!empty($object['Attribute'])) {
|
||||||
foreach ($object['Attribute'] as $attribute) {
|
foreach ($object['Attribute'] as $attribute) {
|
||||||
if ($oldest_timestamp == false || $oldest_timestamp < $attribute['timestamp']) {
|
if ($oldest_timestamp == false || $oldest_timestamp > $attribute['timestamp']) {
|
||||||
$oldest_timestamp = $attribute['timestamp'];
|
$oldest_timestamp = $attribute['timestamp'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1407,7 +1407,7 @@ class EventsController extends AppController
|
||||||
$startDate = null;
|
$startDate = null;
|
||||||
$modificationMap = array();
|
$modificationMap = array();
|
||||||
foreach ($event['Attribute'] as $k => $attribute) {
|
foreach ($event['Attribute'] as $k => $attribute) {
|
||||||
if ($oldest_timestamp == false || $oldest_timestamp < $attribute['timestamp']) {
|
if ($oldest_timestamp == false || $oldest_timestamp > $attribute['timestamp']) {
|
||||||
$oldest_timestamp = $attribute['timestamp'];
|
$oldest_timestamp = $attribute['timestamp'];
|
||||||
}
|
}
|
||||||
if ($startDate === null || $attribute['timestamp'] < $startDate) {
|
if ($startDate === null || $attribute['timestamp'] < $startDate) {
|
||||||
|
|
Loading…
Reference in New Issue