Skip to content

Commit

Permalink
avoid die statement in LJ/Poll.pm
Browse files Browse the repository at this point in the history
Error loading poll id: 1903855: Invalid journalid  at /home/dw/production/cgi-bin/LJ/Poll.pm line 558.

This seemed the best course of action, since we're also
returning undef if the subsequent row lookup fails.
  • Loading branch information
kareila committed Feb 16, 2017
1 parent 60d05ba commit b2ab126
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cgi-bin/LJ/Poll.pm
Expand Up @@ -553,6 +553,8 @@ sub _load {
my $journalid = $dbr->selectrow_array("SELECT journalid FROM pollowner WHERE pollid=?", undef, $self->pollid);
die $dbr->errstr if $dbr->err;

return undef unless $journalid;

my $row = '';

my $u = LJ::load_userid( $journalid )
Expand Down

0 comments on commit b2ab126

Please sign in to comment.