bugfix
authorJoey Hess <joey@kitenet.net>
Tue, 6 Jul 2010 19:59:08 +0000 (15:59 -0400)
committerJoey Hess <joey@kitenet.net>
Tue, 6 Jul 2010 19:59:08 +0000 (15:59 -0400)
IkiWiki/Plugin/aggregate.pm

index 7789c4c2a9d38b7e616d9d3b4df8e4d96fe74ec6..e473fc6430819bbb19a0120d0acca4106b25edc7 100644 (file)
@@ -359,9 +359,14 @@ sub savestate () {
 
        my $timestamp=undef;
        foreach my $feed (keys %feeds) {
-               my $t=$feeds{$feed}->{lastupdate}+$feeds{$feed}->{updateinterval};
-               if (! defined $timestamp || $timestamp > $t) {
-                       $timestamp=$t;
+               if (defined $feeds{$feed}->{lastupdate}) {
+                       my $t=$feeds{$feed}->{lastupdate}+$feeds{$feed}->{updateinterval};
+                       if (! defined $timestamp || $timestamp > $t) {
+                               $timestamp=$t;
+                       }
+               }
+               else {
+                       $timestamp=0;
                }
        }
        $newfile=~s/\.new$/time/;