From 92759b81b76657a14c9b106294004646320cd449 Mon Sep 17 00:00:00 2001 From: Marko Oldenburg Date: Mon, 27 May 2019 09:55:45 +0200 Subject: [PATCH] fix crash then call ARRAY --- 73_GardenaSmartBridge.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/73_GardenaSmartBridge.pm b/73_GardenaSmartBridge.pm index 36c29a0..78b8f7c 100644 --- a/73_GardenaSmartBridge.pm +++ b/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 {