Skip to content

Commit

Permalink
Handle the case of a firehose.url_id column pointing to a missing row
Browse files Browse the repository at this point in the history
gracefully (throwing a fatal error, it turns out, does not qualify
as graceful)
  • Loading branch information
jamiemccarthy committed Dec 6, 2007
1 parent b257743 commit 24ae61f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions plugins/FireHose/FireHose.pm
Expand Up @@ -771,8 +771,9 @@ sub allowSubmitForUrl {
sub getURLsForItem {
my($self, $item) = @_;
my $url_id = $item->{url_id};
my $url = $url_id ? $self->getUrl($url_id)->{url} : undef;
my $url_prepend = $url ? qq{<a href="$url">$url</a>} : '';
my $url = $url_id ? $self->getUrl($url_id) : undef;
$url = $url->{url} if $url;
my $url_prepend = $url ? qq{<a href="$url">$url</a>} : '';
my $text = qq{$url_prepend $item->introtext $item->{bodytext}};

my %urls = ( );
Expand Down

0 comments on commit 24ae61f

Please sign in to comment.