add check if defined
This commit is contained in:
		@@ -497,14 +497,12 @@ sub ErrorHandling($$$) {
 | 
				
			|||||||
        return;
 | 
					        return;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if ( defined($param)
 | 
					    if ( defined($data)
 | 
				
			||||||
        and $param
 | 
					        and $data
 | 
				
			||||||
        (
 | 
					        (
 | 
				
			||||||
            ( $data =~ /Error/ )
 | 
					            ( $data =~ /Error/ )
 | 
				
			||||||
            or defined( eval { decode_json($data) }->{errors} )
 | 
					            or defined( eval { decode_json($data) }->{errors} )
 | 
				
			||||||
        )
 | 
					        )
 | 
				
			||||||
        and ref($param->{code}) eq 'HASH'
 | 
					 | 
				
			||||||
        and exists( $param->{code} )
 | 
					 | 
				
			||||||
      )
 | 
					      )
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        readingsBeginUpdate($dhash);
 | 
					        readingsBeginUpdate($dhash);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user