fix undefined value
Can't use an undefined value as an ARRAY reference at ./FHEM/59_Weather.pm line 589
This commit is contained in:
parent
7d0a835c71
commit
745fea37e2
@ -586,7 +586,9 @@ sub Weather_WriteReadings {
|
||||
else {
|
||||
Weather_DeleteAlertsReadings($hash);
|
||||
readingsBulkUpdate( $hash, 'warnCount',
|
||||
scalar( @{ $dataRef->{alerts} } ) );
|
||||
scalar( @{ $dataRef->{alerts} } ) )
|
||||
if ( defined( $dataRef->{alerts} )
|
||||
&& ref( $dataRef->{alerts} ) eq 'ARRAY' );
|
||||
}
|
||||
|
||||
### state
|
||||
|
Loading…
x
Reference in New Issue
Block a user