2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +00:00

98_SVG.pm: Fix warning (Forum #69766)

git-svn-id: https://svn.fhem.de/fhem/trunk@13835 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2017-03-28 16:38:19 +00:00
parent cbdfb65be1
commit ca2ff58e73

View File

@ -760,8 +760,7 @@ SVG_readgplotfile($$$)
my $plotReplace = AttrVal($wl, "plotReplace", undef);
my ($list, $pr) = parseParams($plotReplace,"\\s"," ") if($plotReplace);
sub
prSubst($)
my $prSubst = sub($)
{
my $v = $pr->{$_[0]};
return "%$_[0]%" if(!$v);
@ -771,12 +770,12 @@ SVG_readgplotfile($$$)
} else {
return $v;
}
}
};
foreach my $l (@svgplotfile) {
$l = "$l\n" unless $l =~ m/\n$/;
map { $l =~ s/%($_)%/prSubst($1)/ge } keys %$pr if($plotReplace);
map { $l =~ s/%($_)%/&$prSubst($1)/ge } keys %$pr if($plotReplace);
my ($src, $plotfn) = (undef, undef);
if($l =~ m/^#([^ ]*) (.*)$/) {
if($1 eq $ldType) {