From 8545a5edf4c9994e3697bb4e59b9f185a7f51bd6 Mon Sep 17 00:00:00 2001 From: "klaus.schauer" <> Date: Fri, 24 Sep 2021 14:42:44 +0000 Subject: [PATCH] 00_TCM: ARRAY reference error corrected git-svn-id: https://svn.fhem.de/fhem/trunk@25016 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/00_TCM.pm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/fhem/FHEM/00_TCM.pm b/fhem/FHEM/00_TCM.pm index aade6518c..42fcd061d 100755 --- a/fhem/FHEM/00_TCM.pm +++ b/fhem/FHEM/00_TCM.pm @@ -1553,11 +1553,13 @@ sub TCM_Undef($$) { last; } } - for (my $i = 0; $i <= @{$modules{"$hash->{TYPE}"}{ChipID}}; $i++) { - if (${$modules{"$hash->{TYPE}"}{ChipID}}[$i] eq $hash->{ChipID}) { - Log3 $name, 4, "TCM $name remove module ChipID: " . ${$modules{"$hash->{TYPE}"}{ChipID}}[$i]; - splice(@{$modules{"$hash->{TYPE}"}{ChipID}}, $i, 1); - last; + if (exists $modules{"$hash->{TYPE}"}{ChipID}) { + for (my $i = 0; $i <= @{$modules{"$hash->{TYPE}"}{ChipID}}; $i++) { + if (${$modules{"$hash->{TYPE}"}{ChipID}}[$i] eq $hash->{ChipID}) { + Log3 $name, 4, "TCM $name remove module ChipID: " . ${$modules{"$hash->{TYPE}"}{ChipID}}[$i]; + splice(@{$modules{"$hash->{TYPE}"}{ChipID}}, $i, 1); + last; + } } } RemoveInternalTimer($hash, 'TCM_msgCounter');