mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
MAX: fix usage of each()
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@2285 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
6de18a8191
commit
d9f5348143
@ -98,8 +98,8 @@ MAX_DateTime2Internal($)
|
|||||||
sub
|
sub
|
||||||
MAX_TypeToTypeId($)
|
MAX_TypeToTypeId($)
|
||||||
{
|
{
|
||||||
while (my ($typeId, $type) = each (%device_types)) {
|
foreach (keys %device_types) {
|
||||||
return $typeId if($_[0] eq $type);
|
return $_ if($_[0] eq $device_types{$_});
|
||||||
}
|
}
|
||||||
Log 1, "MAX_TypeToTypeId: Invalid type $_[0]";
|
Log 1, "MAX_TypeToTypeId: Invalid type $_[0]";
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user