70_LaMetric2: fix uninitialized value

git-svn-id: https://svn.fhem.de/fhem/trunk@19708 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
jpawlowski 2019-06-25 07:56:44 +00:00
parent dcc374a074
commit b86ee78ce5

View File

@ -823,8 +823,13 @@ sub LaMetric2_ReceiveCommand($$$) {
# If we received a response to a write command, # If we received a response to a write command,
# make that data available # make that data available
if ( $method ne "GET" && $method ne "DELETE" ) { if ( $method ne "GET"
my $endpoint = $response->{success}->{path}; && $method ne "DELETE"
&& defined( $response->{success} )
&& defined( $response->{success}{path} )
&& defined( $response->{success}{data} ) )
{
my $endpoint = $response->{success}{path};
$endpoint =~ s/^(.*[\\\/])//; $endpoint =~ s/^(.*[\\\/])//;
$response->{$endpoint} = $response->{success}{data}; $response->{$endpoint} = $response->{success}{data};
} }
@ -2749,7 +2754,7 @@ Leider keine deutsche Dokumentation vorhanden. Die englische Version gibt es hie
=for :application/json;q=META.json 70_LaMetric2.pm =for :application/json;q=META.json 70_LaMetric2.pm
{ {
"version": "v2.3.2", "version": "v2.3.3",
"release_status": "stable", "release_status": "stable",
"author": [ "author": [
"Julian Pawlowski <julian.pawlowski@gmail.com>" "Julian Pawlowski <julian.pawlowski@gmail.com>"