aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/MGA/Advisories.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/MGA/Advisories.pm b/lib/MGA/Advisories.pm
index a4bd668..5130655 100644
--- a/lib/MGA/Advisories.pm
+++ b/lib/MGA/Advisories.pm
@@ -143,8 +143,9 @@ sub publish_advisories {
sub adv_sort {
my $advdb = shift;
sort {
- my $pa = $advdb->{advisories}{$a}{status}{published};
- my $pb = $advdb->{advisories}{$b}{status}{published};
+ my $now = time;
+ my $pa = $advdb->{advisories}{$a}{status}{published} || $now;
+ my $pb = $advdb->{advisories}{$b}{status}{published} || $now;
return $pa == $pb ? $b cmp $a : $pb cmp $pa;
} @_;
}