2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-08 13:24:56 +00:00

72_UBUS_CLIENT: workaround when result has no error code (Forum #126627)

git-svn-id: https://svn.fhem.de/fhem/trunk@25792 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
xenos1984 2022-03-07 15:16:09 +00:00
parent 0e0c7df76d
commit 3ebac89233

View File

@ -517,8 +517,14 @@ sub Decode
my $method = $1;
my $error = $data->{result}[0];
my $result = $data->{result}[1];
my $error = 0;
my $result = $data->{result};
if(ref $result eq 'ARRAY')
{
$error = $result->[0];
$result = $result->[1];
}
if($method eq 'call')
{