From a9b721a9e824cfafefb4926f4704a2236e7d0f64 Mon Sep 17 00:00:00 2001 From: LeonGaultier Date: Mon, 27 May 2019 07:57:58 +0000 Subject: [PATCH] 73_GardenaSmartBridge: fix crash then call ARRAY reference git-svn-id: https://svn.fhem.de/fhem/trunk@19473 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 1 + fhem/FHEM/73_GardenaSmartBridge.pm | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index 85a1d6a6c..79da9f66a 100644 --- a/fhem/CHANGED +++ b/fhem/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: 73_GardenaSmartBridge: fix crash then call ARRAY reference - change: 49_SSCam: enhanced log entries of snapinfos with debugactivetoken - change: 49_SSCam: attributes rec/snapemailtxt, rec/snaptelegramtxt may contain ":", StmKey quoted depending on attribute diff --git a/fhem/FHEM/73_GardenaSmartBridge.pm b/fhem/FHEM/73_GardenaSmartBridge.pm index 36c29a051..78b8f7cdf 100644 --- a/fhem/FHEM/73_GardenaSmartBridge.pm +++ b/fhem/FHEM/73_GardenaSmartBridge.pm @@ -59,7 +59,7 @@ use strict; use warnings; use FHEM::Meta; -my $version = "1.6.3"; +my $version = "1.6.4"; sub GardenaSmartBridge_Initialize($) { @@ -735,7 +735,7 @@ sub WriteReadings($$) { readingsBulkUpdateIfChanged( $hash, 'zones', scalar( @{ $decode_json->{zones} } ) ); } - elsif ( $decode_json->{id} ne $hash->{helper}{locations_id} ) { + elsif ( $decode_json->{id} ne $hash->{helper}{locations_id} and ref($decode_json->{abilities}) eq 'ARRAY' ) { my $properties = scalar( @{ $decode_json->{abilities}[0]{properties} } ); do {