GetFn without argument dumps warnings

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@2032 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2012-10-28 17:59:51 +00:00
parent 987595d203
commit 6f6dd9af1c

View File

@ -2427,16 +2427,17 @@ FW_Get($@)
$FW_wname= $hash->{NAME};
%FW_icons= %{$hash->{fhemIcons}};
if($a[1] eq "icon") {
my $arg = (defined($a[1]) ? $a[1] : "");
if($arg eq "icon") {
return "need one icon as argument" if(int(@a) != 3);
my $icon= FW_IconPath($a[2]);
return defined($icon) ? $icon : "no such icon";
} elsif($a[1] eq "pathlist") {
} elsif($arg eq "pathlist") {
return FW_PathList();
} else {
return "Unknown argument $a[1], choose one of icon pathlist";
return "Unknown argument $arg choose one of icon pathlist";
}
}