testinfo.pl: Fix array sort on old perl
PATCH 1/1 testinfo.pl: Fix array sort on old perl
From: Petr Vorel <[email protected]>
It fixes failure on perl v5.16.3 (Centos 7):
Can't use an undefined value as an ARRAY reference at docparse/testinfo.pl line 427.
Fixes 824e34034 ("docparse: Sort alphabetically tags in table")
Signed-off-by Petr Vorel <[email protected]>
--- docparse/testinfo.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
docparse/testinfo.pl +1 -1
@@ -424,7 +424,7 @@ sub content_all_tests $tmp2 = undef; my %commits; - my @sorted_tags = sort { $a->[0] cmp $b->[0] } @{$json->{'tests'}{$name}{tags}}; + my @sorted_tags = sort { $a->[0] cmp $b->[0] } @{$json->{'tests'}{$name}{tags} // []}; for my $tag (@sorted_tags) { if (!defined($tmp2)) {
Signature · 1 line
2.31.1
PATCH 1/1 testinfo.pl: Fix array sort on old perl
Hi!
Looks good, acked.
Signature · 2 lines
Cyril Hrubis [email protected]
PATCH 1/1 testinfo.pl: Fix array sort on old perl
Hi Cyril,
Quoted 2 lines
Hi!
Looks good, acked.
Thanks a lot, merged!
Kind regards,
Petr