diff options
author | Tzafrir Cohen <tzafrir@cohens.org.il> | 2009-05-25 02:20:35 +0300 |
---|---|---|
committer | Tzafrir Cohen <tzafrir@cohens.org.il> | 2009-05-25 02:20:35 +0300 |
commit | e73392763c011dade12dde89a5b723138794cc55 (patch) | |
tree | a40955dd87e97d65b174ecbd3cb19a1ed75f9b1a | |
parent | b04f5369bc96202277030974110758079e54b6a9 (diff) |
fix assign_append of multi-line value
The output of _format_convert() was used in a scalar context in
_do_append. This caused arrays or hashes (after being successfully
dereferenced) to be listed simply as the number of items.
-rwxr-xr-x | lib/Asterisk/config.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Asterisk/config.pm b/lib/Asterisk/config.pm index 01211b8..14a386b 100755 --- a/lib/Asterisk/config.pm +++ b/lib/Asterisk/config.pm @@ -544,7 +544,7 @@ my @NEW; if (defined $section_name && $one_case->{'section'} eq $section_name && $one_case->{'point'} eq 'up') { push(@NEW,&_format_convert($one_case->{'data'})); $auto_save=1; } elsif (defined $section_name && $one_case->{'section'} eq $section_name && $one_case->{'point'} eq 'down') { - push(@NEW,$one_line); $one_line=&_format_convert($one_case->{'data'}); $auto_save=1; + push(@NEW,$one_line); $one_line = join "\n", &_format_convert($one_case->{'data'}); $auto_save=1; # for foot matched section } elsif (defined $section_name && $one_case->{'section'} eq $section_name && $one_case->{'point'} eq 'foot') { $save_tmpmem=1; @@ -554,7 +554,7 @@ my @NEW; # for foot 发现匹配的section已经到达整个结尾 } if ($save_tmpmem == 1 && $offset==$#{$data}) { - push(@NEW,$one_line); $one_line=&_format_convert($one_case->{'data'}); + push(@NEW,$one_line); $one_line = join "\n", &_format_convert($one_case->{'data'}); $auto_save=1; $save_tmpmem=0; } |