]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
view: avoid uninitialized var from diff query textarea
authorEric Wong <e@80x24.org>
Mon, 11 Nov 2024 21:56:56 +0000 (21:56 +0000)
committerEric Wong <e@80x24.org>
Tue, 12 Nov 2024 20:13:18 +0000 (20:13 +0000)
Rare commits without titles and emails without a Subject: header
should not litter stderr or syslog with uninitialized variable
warnings.

lib/PublicInbox/View.pm

index 275258e3f29ed6ce3a78a0625910cff834376f02..7ca85a859b51fdb1e8df1a623ac02f4d764c40ba 100644 (file)
@@ -849,7 +849,7 @@ sub thread_skel ($$$) {
 sub dfqry_text ($$) {
        my ($ctx, $subj) = @_;
        my $qry_dfblob = delete $ctx->{-qry_dfblob} or return (undef);
-       my @bs = split /["\x{201c}\x{201d}]+/, $subj;
+       my @bs = split /["\x{201c}\x{201d}]+/, $subj // '';
        my $q = join ' ', (@bs ? ('(') : ()), map {
                chop if length > 7; # include 1 abbrev "older" patches
                "dfblob:$_";