33_readingsGroup.pm: fixed warning

git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@8775 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
justme1968
2015-06-19 11:19:03 +00:00
parent 9116935250
commit 2f08ccc5a9

View File

@@ -558,7 +558,7 @@ readingsGroup_value2html($$$$$$$$$)
if( !$values ) { if( !$values ) {
my %extPage = (); my %extPage = ();
my ($allSets, undef, undef) = FW_devState($name, $room, \%extPage); my ($allSets, undef, undef) = FW_devState($name, $room, \%extPage);
$allSets = getAllAttr($name) if( $type eq 'attr' ); $allSets = getAllAttr($name) if( $type && $type eq 'attr' );
my ($set) = split( ' ', $set, 2 ); my ($set) = split( ' ', $set, 2 );
if( $allSets && $allSets =~ m/\b$set:([^ ]*)/) { if( $allSets && $allSets =~ m/\b$set:([^ ]*)/) {
$values = $1; $values = $1;
@@ -585,7 +585,7 @@ readingsGroup_value2html($$$$$$$$$)
} }
if( $htmlTxt ) { if( $htmlTxt ) {
if( $type eq 'attr' ) { if( $type && $type eq 'attr' ) {
my $current = AttrVal( $name, $n, 'unknown' ); my $current = AttrVal( $name, $n, 'unknown' );
$htmlTxt =~ s/cmd=/type='attr' cmd=/; $htmlTxt =~ s/cmd=/type='attr' cmd=/;
$htmlTxt =~ s/current='[^']*'/current='$current'/; $htmlTxt =~ s/current='[^']*'/current='$current'/;