From 8bb669f2be7d634fc8d314ea7bfb56ac711b3aa1 Mon Sep 17 00:00:00 2001 From: Alex Schroeder Date: Tue, 20 Feb 2007 14:08:21 +0000 Subject: [PATCH] (DoJournalRss): Protect call to GetKeptRevision using eval for cases where the old revision is no longer available. --- modules/journal-rss.pl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/journal-rss.pl b/modules/journal-rss.pl index b71e1a73..d79e6203 100644 --- a/modules/journal-rss.pl +++ b/modules/journal-rss.pl @@ -16,7 +16,7 @@ # 59 Temple Place, Suite 330 # Boston, MA 02111-1307 USA -$ModulesDescription .= '

$Id: journal-rss.pl,v 1.14 2006/12/21 21:56:34 as Exp $

'; +$ModulesDescription .= '

$Id: journal-rss.pl,v 1.15 2007/02/20 14:08:21 as Exp $

'; $Action{journal} = \&DoJournalRss; @@ -63,8 +63,12 @@ sub DoJournalRss { # If this is a minor edit, get the timestamp of the last major # edit. if ($Page{minor}) { - my %keep = GetKeptRevision($Page{lastmajor}); - $Page{ts} = $keep{ts}; + # Perhaps the old kept revision is gone due to $KeepMajor=0 or + # admin.pl... + eval { + my %keep = GetKeptRevision($Page{lastmajor}); + $Page{ts} = $keep{ts}; + } } unshift (@fullrc, join($FS, $Page{ts}, $id, $Page{minor}, $Page{summary}, $Page{host}, $Page{username}, $Page{revision}, $Page{languages},