-
Notifications
You must be signed in to change notification settings - Fork 2.5k
[Soap\Client\DotNet][FIX] Undefined property in void return #5793
[Soap\Client\DotNet][FIX] Undefined property in void return #5793
Conversation
@@ -216,7 +216,10 @@ protected function _preProcessArguments($arguments) | |||
protected function _preProcessResult($result) | |||
{ | |||
$resultProperty = $this->getLastMethod() . 'Result'; | |||
return $result->$resultProperty; | |||
if(isset($result->$resultProperty)){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add space before and after parenthesis , see PSR-2 https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md#51-if-elseif-else
Yes, of course. |
travis build failure |
Fixed, typo error... And the current Travis build, fail because of github :
|
Change, |
[Soap\Client\DotNet][FIX] Undefined property in void return
…pDotNetEmptyResult [Soap\Client\DotNet][FIX] Undefined property in void return
The dotNet soap implementation send the result in a [LastRequest]Result xml node, so the DotNet _preProcessResult return directly this node.
But in some case, when the method return nothing and if this behaviour is not defined in the ws defition (wsdl for example), a notice error is raised because the searched node does not exists.
So I have added an exists condition on the [LastRequest]Result xml node to avoid this error.
The code is not unit-tested because I don't know how to test this peculiar behaviour, but the modification is really really tiny.