MAX: fix access to undefined variable in MAX_DbLog_splitFn (thanks to gero)

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@8494 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
mgehre 2015-04-28 20:38:47 +00:00
parent 759ef6c873
commit 888c9c127b

View File

@ -896,7 +896,7 @@ MAX_DbLog_splitFn($)
$reading = shift @parts;
$reading =~ tr/://d;
$value = $parts[0];
$value = $parts[1] if (lc($value) =~ m/auto/);
$value = $parts[1] if(defined($value) && lc($value) =~ m/auto/);
$unit = "\xB0C" if(lc($reading) =~ m/temp/);
$unit = "%" if(lc($reading) =~ m/valve/);
return ($reading, $value, $unit);