2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 18:59:33 +00:00

98_SVG.pm: do not crash when plotSize is not set (Forum #97977)

git-svn-id: https://svn.fhem.de/fhem/trunk@18777 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2019-03-03 13:16:05 +00:00
parent be837ed681
commit 22efb2da69

View File

@ -149,7 +149,7 @@ SVG_AttrFn(@)
{
my ($cmd,$name,$aName,$aVal) = @_;
if($aName eq "captionLeft" && $cmd eq "set") {
if($aName && $aName eq "captionLeft" && $cmd eq "set") {
my $dir = (!defined($aVal) || $aVal) ? "left" : "right";
AnalyzeCommand(undef, "attr $name captionPos $dir");
return "attr $name captionLeft converted to attr $name captionPos $dir";
@ -179,8 +179,9 @@ sub
SVG_getplotsize($)
{
my ($d) = @_;
return $FW_webArgs{plotsize} ?
$FW_webArgs{plotsize} : AttrVal($d,"plotsize",$FW_plotsize);
return $FW_webArgs{plotsize} ?
$FW_webArgs{plotsize} :
AttrVal($d,"plotsize", $FW_plotsize ? $FW_plotsize : "800,400");
}
sub