mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-21 07:56:03 +00:00
fhem.pl: fix warning if ParseFn returns undef (Forum #27737)
git-svn-id: https://svn.fhem.de/fhem/trunk@6730 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
3e0ab87c4e
commit
af82486e6f
@ -170,6 +170,7 @@ sub cfgDB_svnId;
|
|||||||
# DefFn - define a "device" of this type
|
# DefFn - define a "device" of this type
|
||||||
# DeleteFn - clean up (delete logfile), called by delete after UndefFn
|
# DeleteFn - clean up (delete logfile), called by delete after UndefFn
|
||||||
# ExceptFn - called if the global select reports an except field
|
# ExceptFn - called if the global select reports an except field
|
||||||
|
# FingerprintFn - convert messages for duplicate detection
|
||||||
# GetFn - get some data from this device
|
# GetFn - get some data from this device
|
||||||
# NotifyFn - call this if some device changed its properties
|
# NotifyFn - call this if some device changed its properties
|
||||||
# ParseFn - Interpret a raw message
|
# ParseFn - Interpret a raw message
|
||||||
@ -3031,7 +3032,6 @@ Dispatch($$$)
|
|||||||
return rejectDuplicate($name,$idx,$addvals) if($isdup);
|
return rejectDuplicate($name,$idx,$addvals) if($isdup);
|
||||||
|
|
||||||
my @found;
|
my @found;
|
||||||
|
|
||||||
my $clientArray = $hash->{".clientArray"};
|
my $clientArray = $hash->{".clientArray"};
|
||||||
$clientArray = computeClientArray($hash, $module) if(!$clientArray);
|
$clientArray = computeClientArray($hash, $module) if(!$clientArray);
|
||||||
|
|
||||||
@ -3050,7 +3050,7 @@ Dispatch($$$)
|
|||||||
last if(int(@found));
|
last if(int(@found));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!int(@found)) {
|
if(!int(@found) || !defined($found[0])) {
|
||||||
my $h = $hash->{MatchList}; $h = $module->{MatchList} if(!$h);
|
my $h = $hash->{MatchList}; $h = $module->{MatchList} if(!$h);
|
||||||
if(defined($h)) {
|
if(defined($h)) {
|
||||||
foreach my $m (sort keys %{$h}) {
|
foreach my $m (sort keys %{$h}) {
|
||||||
@ -3077,7 +3077,7 @@ Dispatch($$$)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!int(@found)) {
|
if(!int(@found) || !defined($found[0])) {
|
||||||
DoTrigger($name, "UNKNOWNCODE $dmsg");
|
DoTrigger($name, "UNKNOWNCODE $dmsg");
|
||||||
Log3 $name, 3, "$name: Unknown code $dmsg, help me!";
|
Log3 $name, 3, "$name: Unknown code $dmsg, help me!";
|
||||||
return undef;
|
return undef;
|
||||||
@ -3097,7 +3097,7 @@ Dispatch($$$)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return undef if(!int(@found) || $found[0] eq ""); # Special return: Do not notify
|
return undef if(!defined($found[0]) || $found[0] eq ""); # Special return: Do not notify
|
||||||
|
|
||||||
foreach my $found (@found) {
|
foreach my $found (@found) {
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user