Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

[Soap\Client\DotNet][FIX] Undefined property in void return #5793

Merged
merged 4 commits into from
Mar 4, 2014

Conversation

lilobase
Copy link
Contributor

@lilobase lilobase commented Feb 6, 2014

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.

@@ -216,7 +216,10 @@ protected function _preProcessArguments($arguments)
protected function _preProcessResult($result)
{
$resultProperty = $this->getLastMethod() . 'Result';
return $result->$resultProperty;
if(isset($result->$resultProperty)){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lilobase
Copy link
Contributor Author

lilobase commented Feb 6, 2014

Yes, of course.
Sorry for the inconvenience, its fixed, good now ?

@samsonasik
Copy link
Contributor

travis build failure

@lilobase
Copy link
Contributor Author

lilobase commented Feb 6, 2014

Fixed, typo error...

And the current Travis build, fail because of github :

[Composer\Downloader\TransportException]The 'https://api.github.com/repos/mikey179/vfsStream/zipball/063fb10633f10c5ccbcac26227e94f46d9336f90' URL could not be accessed: HTTP/1.1 403 Forbidden

@lilobase
Copy link
Contributor Author

Change,
If the value is null isset return false, so the use of property_exists is a better option for this kind of test.

@weierophinney weierophinney added this to the 2.3.0 milestone Mar 3, 2014
weierophinney added a commit that referenced this pull request Mar 4, 2014
[Soap\Client\DotNet][FIX] Undefined property in void return
weierophinney added a commit that referenced this pull request Mar 4, 2014
@weierophinney weierophinney merged commit 90e7a7d into zendframework:develop Mar 4, 2014
weierophinney added a commit to zendframework/zend-soap that referenced this pull request May 15, 2015
…pDotNetEmptyResult

[Soap\Client\DotNet][FIX] Undefined property in void return
weierophinney added a commit to zendframework/zend-soap that referenced this pull request May 15, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants