From fc92ce8845ac5f09939722537624fa48441f7c0b Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 3 Apr 2020 05:06:59 +0000 Subject: view: handle the topic-free case properly There may be no topics for a given timestamp range, so don't attempt to treat `undef' as an arrayref. --- lib/PublicInbox/View.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 89174296..c42654b6 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -1056,7 +1056,7 @@ sub acc_topic { # walk_thread callback sub dump_topics { my ($ctx) = @_; my $order = delete $ctx->{order}; # [ ds, subj1, subj2, subj3, ... ] - if (!@$order) { + unless ($order) { $ctx->{-html_tip} = '
[No topics in range]
'; return 404; } -- cgit v1.2.3-24-ge0c7