diff --git a/CHANGED b/CHANGED index d9258af6e..b332ba3e7 100644 --- a/CHANGED +++ b/CHANGED @@ -1,5 +1,6 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - bugfix: 70_ZoneMinder: fixed uninitialized value warnings - feature: 74_XiaomiBTLESens: code implementation for ClearGrassSens - bugfix: 73_AutoShuttersControl: fix window close fn then Mode_Up off - change: 93_DbLog: change SQL-Statement for SVG delta-h and delta-d plots, diff --git a/FHEM/70_ZoneMinder.pm b/FHEM/70_ZoneMinder.pm index 170d2a64f..903869600 100755 --- a/FHEM/70_ZoneMinder.pm +++ b/FHEM/70_ZoneMinder.pm @@ -434,7 +434,7 @@ sub ZoneMinder_GetFromJson { my $poma = $`; $searchLength = length($ma); } else { - Log3 $name, 1, "ZoneMinder ($name) - $searchString NOT found. Please report, this is a problem."; + Log3 $name, 4, "ZoneMinder ($name) - $searchString NOT found in $config."; return; } @@ -457,7 +457,8 @@ sub ZoneMinder_API_UpdateMonitors_Callback { foreach my $monitorData (@monitors) { my $monitorId = ZoneMinder_GetConfigValueByKey($hash, $monitorData, 'Id'); - + + next if ! defined $monitorId; if ( $monitorId =~ /^[0-9]+$/ ) { ZoneMinder_UpdateMonitorAttributes($hash, $monitorData, $monitorId); } else { @@ -492,6 +493,7 @@ sub ZoneMinder_API_CreateMonitors_Callback { foreach my $monitorData (@monitors) { my $monitorId = ZoneMinder_GetConfigValueByKey($hash, $monitorData, 'Id'); + next if ! defined $monitorId; if ( $monitorId =~ /^[0-9]+$/ ) { my $dispatchResult = Dispatch($hash, "createMonitor:$monitorId", undef); } @@ -633,6 +635,9 @@ sub ZoneMinder_API_QueryEventDetails_Callback { $data =~ s/\R//g; my $zmMonitorId = ZoneMinder_GetConfigValueByKey($hash, $data, 'MonitorId'); + if ( ! defined $zmMonitorId ) { + return undef; + } my $zmEventId = ZoneMinder_GetConfigValueByKey($hash, $data, 'Id'); my $zmNotes = ZoneMinder_GetConfigValueByKey($hash, $data, 'Notes');