From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 4A0921F569 for ; Fri, 24 May 2024 00:56:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1716512199; bh=34vyoor5BhTpnC79lYsO4E+vG+rX75mcdFw5E/5PSRc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=anAAlUr1kssjH/orf8Jau8pDc2zls6AWw3XluebGd6aU/TIUrtRl2Od/ZCeUGjrV/ mG3bUrs1WjOgzInizgBvGAsjP7qWOfpIPAJEqEfC+x9Ke7/Vq05C6krsuYRyREXVHP lAfrfLOTje7TgACgNZylHR738Fhad64hY9dAAbDM= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 2/2] www_coderepo: improve handling of broken repos Date: Fri, 24 May 2024 00:56:38 +0000 Message-ID: <20240524005638.3090446-3-e@80x24.org> In-Reply-To: <20240524005638.3090446-1-e@80x24.org> References: <20240524005638.3090446-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: The {readme} arrayref may be completely unset if a repo goes missing, so account for that when the summary page runs. --- lib/PublicInbox/WwwCoderepo.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PublicInbox/WwwCoderepo.pm b/lib/PublicInbox/WwwCoderepo.pm index a5e2dc4a..8587f530 100644 --- a/lib/PublicInbox/WwwCoderepo.pm +++ b/lib/PublicInbox/WwwCoderepo.pm @@ -186,7 +186,7 @@ EOM print $zfh "...\n" if $last; # README - my ($bref, $oid, $ref_path) = @{delete $ctx->{qx_res}->{readme}}; + my ($bref, $oid, $ref_path) = @{delete $ctx->{qx_res}->{readme} // []}; if ($bref) { my $l = PublicInbox::Linkify->new; $$bref =~ s/\s*\z//sm;