Skip to content

Commit

Permalink
Fix parseOutput undefined property (closes skaut#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
JindrichPilar committed Feb 10, 2020
1 parent 48a2e95 commit 45d2d39
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Wsdl/WebService.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,17 @@ protected function prepareArgs(string $functionName, array $arguments): array
*/
protected function parseOutput(string $fname, $ret): array
{
if (!$ret) {
return [];
}

//pokud obsahuje Output tak vždy vrací pole i s jedním prvkem.
$result = $ret->{$fname . 'Result'};
$result = $ret->{$fname . 'Result'} ?? null;
if (!isset($result)) {
return $ret;
}

$output = $result->{$fname . 'Output'};
$output = $result->{$fname . 'Output'} ?? null;
if (!isset($output)) {
return $result; //neobsahuje $fname.Output
}
Expand Down

0 comments on commit 45d2d39

Please sign in to comment.