From 8e2236bf2cf71752c5f0c207ce0d7b351c422460 Mon Sep 17 00:00:00 2001 From: LeonGaultier Date: Wed, 15 Jan 2020 05:54:55 +0000 Subject: [PATCH] 73_NUKIBridge: fix FHEM crashed if json empty Array git-svn-id: https://svn.fhem.de/fhem/trunk@20984 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 1 + fhem/FHEM/73_NUKIBridge.pm | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index de61c50e3..e8d0715dc 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_NUKIBridge: fix FHEM crashed if json empty Array - bugfix: 70_ONKYO_AVR: fixed command for previous title (thx Fusssel) - feature: 70_ONKYO_AVR: introduced 'set rawCommand' - change: 98_todoist: removed Attribute "sortTasks" / better commandref diff --git a/fhem/FHEM/73_NUKIBridge.pm b/fhem/FHEM/73_NUKIBridge.pm index 7a494427b..b92af4e35 100644 --- a/fhem/FHEM/73_NUKIBridge.pm +++ b/fhem/FHEM/73_NUKIBridge.pm @@ -866,7 +866,8 @@ sub ResponseProcessing($$$) { and scalar( @{$decode_json} ) > 0 and $endpoint eq 'list' ) - or ( ref( $decode_json->{scanResults} ) eq 'ARRAY' + or ( ref($decode_json) eq 'HASH' + and ref( $decode_json->{scanResults} ) eq 'ARRAY' and scalar( @{ $decode_json->{scanResults} } ) > 0 and $endpoint eq 'info' ) ) @@ -1336,7 +1337,7 @@ sub ParseJSON($$) { ], "release_status": "under develop", "license": "GPL_2", - "version": "v1.9.14", + "version": "v1.9.15", "x_apiversion": "1.9", "author": [ "Marko Oldenburg "