]> git.donarmstrong.com Git - debbugs.git/blobdiff - examples/debian/postpa/22oldbugs
* set the date to zero in cases where the date is empty
[debbugs.git] / examples / debian / postpa / 22oldbugs
index 09428a1f9462e0b37d6cac25db4f5842b2c9d554..bff889dfc82d8df3ea09eb091f347a1720995a29 100755 (executable)
@@ -45,7 +45,9 @@ count_bugs(function => sub {
     return () if @merged and $merged[0] < $d{bug};
 
     # 3600*24*30 (30 days)
-    my $cmonths = int(($startdate - $status->{date}) / 2592000);
+    my $cmonths = int(($startdate -
+                      length($status->{date})?$status->{date}:0) /
+                     2592000);
     if ($cmonths >= 24 && !length($status->{forwarded}) &&
            !$excludepackage{$d{pkg}}) {
        $oldpackage{$d{bug}} = $d{pkg};