From: Eric Wong Date: Fri, 24 May 2024 00:56:38 +0000 (+0000) Subject: www_coderepo: improve handling of broken repos X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7f4bd66427e70ad2b1428a1bbb55052b016072db;p=thirdparty%2Fpublic-inbox.git www_coderepo: improve handling of broken repos The {readme} arrayref may be completely unset if a repo goes missing, so account for that when the summary page runs. --- diff --git a/lib/PublicInbox/WwwCoderepo.pm b/lib/PublicInbox/WwwCoderepo.pm index a5e2dc4a9..8587f5302 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;