fix undefined value as an ARRAY reference

This commit is contained in:
Marko Oldenburg 2021-03-09 08:46:11 +01:00
parent 51d9183c59
commit 8263bd2911

View File

@ -829,7 +829,8 @@ sub WriteReadings {
} }
readingsBulkUpdateIfChanged( $hash, 'zones', readingsBulkUpdateIfChanged( $hash, 'zones',
scalar( @{ $decode_json->{zones} } ) ); scalar( @{ $decode_json->{zones} } ) )
if ( ref($decode_json->{zones}) eq 'ARRAY' );
} }
elsif ($decode_json->{id} ne $hash->{helper}{locations_id} elsif ($decode_json->{id} ne $hash->{helper}{locations_id}
&& ref( $decode_json->{abilities} ) eq 'ARRAY' && ref( $decode_json->{abilities} ) eq 'ARRAY'
@ -1376,7 +1377,7 @@ sub DeletePassword {
], ],
"release_status": "stable", "release_status": "stable",
"license": "GPL_2", "license": "GPL_2",
"version": "v2.0.3", "version": "v2.0.4",
"author": [ "author": [
"Marko Oldenburg <leongaultier@gmail.com>" "Marko Oldenburg <leongaultier@gmail.com>"
], ],