From: Steve Hancock Date: Sun, 4 Oct 2020 00:44:30 +0000 (-0700) Subject: fixed undefined var introduced in recent update X-Git-Tag: 20201001.01~23 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=7fcfaa194947637a3ca9fdb457e5c4395ed1131a;p=perltidy.git fixed undefined var introduced in recent update --- diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index 36722ea3..79231d5b 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -6819,12 +6819,15 @@ sub bli_adjustment { if ( $block_type && $block_type =~ /$bli_pattern/ ) { my $seqno = $rLL->[$KK]->[_TYPE_SEQUENCE_]; my $K_opening = $K_opening_container->{$seqno}; - if ( $KK eq $K_opening ) { - $rLL->[$KK]->[_CI_LEVEL_]++; - $ris_bli_container->{$seqno} = 1; - } - else { - $rLL->[$KK]->[_CI_LEVEL_] = $rLL->[$K_opening]->[_CI_LEVEL_]; + if ( defined($K_opening) ) { + if ( $KK eq $K_opening ) { + $rLL->[$KK]->[_CI_LEVEL_]++; + $ris_bli_container->{$seqno} = 1; + } + else { + $rLL->[$KK]->[_CI_LEVEL_] = + $rLL->[$K_opening]->[_CI_LEVEL_]; + } } } }