From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS16276 149.202.0.0/16 X-Spam-Status: No, score=-3.0 required=3.0 tests=AWL,BAYES_00,SPF_FAIL, SPF_HELO_FAIL shortcircuit=no autolearn=no autolearn_force=no version=3.4.0 Received: from 80x24.org (1.tor.exit.babylon.network [149.202.98.161]) by dcvr.yhbt.net (Postfix) with ESMTP id C005A203BD for ; Sat, 13 Aug 2016 23:53:33 +0000 (UTC) From: Eric Wong To: spew@80x24.org Subject: [PATCH 6/8] view: allow for missing In-Reply-To mapping Date: Sat, 13 Aug 2016 23:53:18 +0000 Message-Id: <20160813235320.10831-6-e@80x24.org> In-Reply-To: <20160813235320.10831-1-e@80x24.org> References: <20160813235320.10831-1-e@80x24.org> List-Id: Because buggy mail clients exist and generate invalid In-Reply-To headers we cannot handle across the board... --- lib/PublicInbox/View.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 5b352d1..3f25028 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -207,8 +207,8 @@ sub _th_index_lite { my $nr_s = 0; my $level = $map->[4]; my $idx = $map->[3]; - if (defined $irt) { - my $irt_map = $mapping->{$irt}; + my $irt_map = $mapping->{$irt} if defined $irt; + if (defined $irt_map) { my $siblings = $irt_map->[0]; $nr_s = scalar(@$siblings) - 1; $rv .= $pad . $irt_map->[1]; -- EW