fix FHEM crash if json of list a empty array

This commit is contained in:
Marko Oldenburg 2020-01-14 21:56:06 +01:00
parent 8f1b164dd0
commit 5a316a4ca2

View File

@ -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 <leongaultier@gmail.com>"