[dw-free] Ugly error when trying to view the threadroot in a deleted entry or with a nonexistent com
[commit: http://hg.dwscoalition.org/dw-free/rev/3c06a8f818d7]
http://bugs.dwscoalition.org/show_bug.cgi?id=3680
One more check, and we're done.
Patch by
fu.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=3680
One more check, and we're done.
Patch by
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Files modified:
- htdocs/go.bml
-------------------------------------------------------------------------------- diff -r 8c3aebd4accd -r 3c06a8f818d7 htdocs/go.bml --- a/htdocs/go.bml Tue May 17 13:14:19 2011 +0800 +++ b/htdocs/go.bml Tue May 17 13:35:30 2011 +0800 @@ -52,7 +52,10 @@ } my $threadroot = LJ::Comment->new( $u, jtalkid => $comment->threadrootid ); - return BML::redirect( $threadroot->url( LJ::viewing_style_args( %GET ) ) ); + my $url = eval { $threadroot->url( LJ::viewing_style_args( %GET ) ) }; + return if $@; + + return BML::redirect( $url ); } # prev/next talkread links --------------------------------------------------------------------------------