]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
www_coderepo: improve handling of broken repos
authorEric Wong <e@80x24.org>
Fri, 24 May 2024 00:56:38 +0000 (00:56 +0000)
committerEric Wong <e@80x24.org>
Sat, 25 May 2024 23:28:01 +0000 (23:28 +0000)
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

index a5e2dc4a9930e25942240147938644d34841a745..8587f530206cb2a95aa5d103c06c3dace58eb5b4 100644 (file)
@@ -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;