98_SVG.pm: avoid warning in plotAsPng if called before FHEMWEB (Forum #97977)

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@18771 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2019-03-02 13:00:47 +00:00
parent 45a68f3a25
commit cdd4c5740e

View File

@ -1070,6 +1070,7 @@ SVG_doShowLog($$$$;$)
{
my ($wl, $d, $type, $file, $noHeader) = @_;
my $pm = AttrVal($wl,"plotmode",$FW_plotmode);
$pm = "SVG" if(!defined($pm)); # if called from plotAsPng before FHEMWEB
my $gplot_pgm = "$FW_gplotdir/$type.gplot";
my ($err, $cfg, $plot, $srcDesc) = SVG_readgplotfile($wl, $gplot_pgm, $pm);