diff --git a/fhem/FHEM/99_Utils.pm b/fhem/FHEM/99_Utils.pm index ae41d7c5b..bccbd8309 100644 --- a/fhem/FHEM/99_Utils.pm +++ b/fhem/FHEM/99_Utils.pm @@ -16,7 +16,7 @@ sub getUniqueId() { my ($err, $uniqueID) = getKeyValue("uniqueID"); - return $uniqueID if(!$err); + return $uniqueID if(defined($uniqueID)); srand(time); $uniqueID = join "",map { unpack "H*", chr(rand(256)) } 1..16; setKeyValue("uniqueID", $uniqueID); @@ -33,7 +33,7 @@ getKeyValue($) for my $l (@l) { return (undef, $1) if($l =~ m/^$key:(.*)/); } - return ("Key not found", undef); + return (undef, undef); } sub @@ -404,7 +404,8 @@ myUtils_Initialize($$)