Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

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

Merged
merged 4 commits into from Mar 4, 2014

Conversation

Projects
None yet
3 participants
Contributor

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.

@samsonasik samsonasik commented on an outdated diff Feb 6, 2014

library/Zend/Soap/Client/DotNet.php
@@ -216,7 +216,10 @@ protected function _preProcessArguments($arguments)
protected function _preProcessResult($result)
{
$resultProperty = $this->getLastMethod() . 'Result';
- return $result->$resultProperty;
+ if(isset($result->$resultProperty)){
Contributor

lilobase commented Feb 6, 2014

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

Contributor

samsonasik commented Feb 6, 2014

travis build failure

Contributor

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

Contributor

lilobase commented Feb 13, 2014

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 weierophinney added a commit that referenced this pull request Mar 4, 2014

@weierophinney weierophinney Merge pull request #5793 from lilobase/SoapDotNetEmptyResult
[Soap\Client\DotNet][FIX] Undefined property in void return
923d131

@weierophinney weierophinney added a commit that referenced this pull request Mar 4, 2014

@weierophinney weierophinney Merge branch 'feature/5793' into develop
Close #5793
8fd58df

@weierophinney weierophinney merged commit 90e7a7d into zendframework:develop Mar 4, 2014

1 check failed

default The Travis CI build could not complete due to an error
Details

@weierophinney weierophinney added a commit to zendframework/zend-soap that referenced this pull request May 15, 2015

@weierophinney weierophinney Merge pull request zendframework/zendframework#5793 from lilobase/Soa…
…pDotNetEmptyResult

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

@weierophinney weierophinney added a commit to zendframework/zend-soap that referenced this pull request May 15, 2015

@weierophinney weierophinney Merge branch 'feature/5793' into develop 743493a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment