Navigation Menu

Skip to content

Commit

Permalink
Prevent bug when using scalar as ARRAY ref
Browse files Browse the repository at this point in the history
- resulting in error: (Can't use string ("snip") as an ARRAY ref while
  "strict refs" in use at interchange/lib/Vend/Scan.pm line 353.
)
  • Loading branch information
jlav1n committed Jan 5, 2018
1 parent da07bbc commit 7982277
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Vend/Scan.pm
Expand Up @@ -345,7 +345,7 @@ sub parse_map {
my(@param) = grep $_, split /[\r\n]+/, $params;
for(@param) {
($var,$source) = split /[\s=]+/, $_, 2;
$ref->{$var} = [] unless defined $ref->{$var};
$ref->{$var} = [] unless $ref->{$var} and ref $ref->{$var} eq 'ARRAY';
$ref->{$source} = '' if ! defined $ref->{$source};
$ref->{$source} =~ s/\0/|/g;
push @{$ref->{$var}}, ($ref->{$source});
Expand Down

0 comments on commit 7982277

Please sign in to comment.