Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

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

Merged
merged 4 commits into from

3 participants

@lilobase

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.

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)){
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@lilobase

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

@samsonasik

travis build failure

@lilobase

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

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
@weierophinney weierophinney merged commit 90e7a7d into zendframework:develop
@weierophinney weierophinney referenced this pull request from a commit in zendframework/zend-soap
@weierophinney weierophinney Merge pull request zendframework/zf2#5793 from lilobase/SoapDotNetEmp…
…tyResult

[Soap\Client\DotNet][FIX] Undefined property in void return
db953bf
@weierophinney weierophinney referenced this pull request from a commit in zendframework/zend-soap
@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
Commits on Jan 24, 2014
  1. @lilobase
Commits on Feb 6, 2014
  1. @lilobase
  2. @lilobase
Commits on Feb 13, 2014
  1. @lilobase

    [FIX] return null value

    lilobase authored
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 1 deletion.
  1. +4 −1 library/Zend/Soap/Client/DotNet.php
View
5 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 (property_exists($result, $resultProperty)) {
+ return $result->$resultProperty;
+ }
+ return $result;
}
/**
Something went wrong with that request. Please try again.