mirror of
https://github.com/php/php-src.git
synced 2024-12-04 15:23:44 +08:00
Merge branch 'PHP-7.3'
This commit is contained in:
commit
1be8b3cbd8
@ -1827,9 +1827,9 @@ static xmlNodePtr to_xml_object(encodeTypePtr type, zval *data, int style, xmlNo
|
||||
sdlType->encode->details.sdl_type->kind != XSD_TYPEKIND_LIST &&
|
||||
sdlType->encode->details.sdl_type->kind != XSD_TYPEKIND_UNION) {
|
||||
|
||||
if (prop) {GC_PROTECT_RECURSION(prop);}
|
||||
if (prop) { GC_TRY_PROTECT_RECURSION(prop); }
|
||||
xmlParam = master_to_xml(sdlType->encode, data, style, parent);
|
||||
if (prop) {GC_UNPROTECT_RECURSION(prop);}
|
||||
if (prop) { GC_TRY_UNPROTECT_RECURSION(prop); }
|
||||
} else {
|
||||
zval rv;
|
||||
zval *tmp = get_zval_property(data, "_", &rv);
|
||||
|
25
ext/soap/tests/bug77410.phpt
Normal file
25
ext/soap/tests/bug77410.phpt
Normal file
@ -0,0 +1,25 @@
|
||||
--TEST--
|
||||
Bug #77410: Segmentation Fault when executing method with an empty parameter
|
||||
--SKIPIF--
|
||||
<?php require_once('skipif.inc'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$client = new class(__DIR__ . '/bug77410.wsdl', [
|
||||
'cache_wsdl' => WSDL_CACHE_NONE,
|
||||
'trace' => 1,
|
||||
]) extends SoapClient {
|
||||
public function __doRequest($request, $location, $action, $version, $one_way = 0) {
|
||||
echo $request, "\n";
|
||||
return '';
|
||||
}
|
||||
};
|
||||
|
||||
$client->MyMethod([
|
||||
'parameter' => [],
|
||||
]);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:test"><SOAP-ENV:Body><ns1:MyMethodRequest><parameter/></ns1:MyMethodRequest></SOAP-ENV:Body></SOAP-ENV:Envelope>
|
61
ext/soap/tests/bug77410.wsdl
Normal file
61
ext/soap/tests/bug77410.wsdl
Normal file
@ -0,0 +1,61 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<definitions targetNamespace="urn:test"
|
||||
xmlns="http://schemas.xmlsoap.org/wsdl/"
|
||||
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
|
||||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||||
xmlns:test="urn:test"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
|
||||
<portType name="TestPortType">
|
||||
<operation name="MyMethod">
|
||||
<input message="test:MyMethodRequestMessage" />
|
||||
<output message="test:MyMethodResponseMessage" />
|
||||
</operation>
|
||||
</portType>
|
||||
|
||||
<binding name="TestBinding" type="test:TestPortType">
|
||||
<operation name="MyMethod">
|
||||
<input><soap:body use="literal" /></input>
|
||||
<output><soap:body use="literal" /></output>
|
||||
</operation>
|
||||
</binding>
|
||||
|
||||
<message name="MyMethodRequestMessage">
|
||||
<part name="parameters" element="test:MyMethodRequest" />
|
||||
</message>
|
||||
|
||||
<message name="MyMethodResponseMessage">
|
||||
<part name="parameters" element="test:MyMethodResponse" />
|
||||
</message>
|
||||
|
||||
<types>
|
||||
<schema targetNamespace="urn:test" xmlns="http://www.w3.org/2001/XMLSchema">
|
||||
|
||||
<element name="MyMethodRequest">
|
||||
<complexType>
|
||||
<sequence>
|
||||
<element name="parameter" type="test:MyMethodRequestObject" />
|
||||
</sequence>
|
||||
</complexType>
|
||||
</element>
|
||||
|
||||
<element name="MyMethodResponse" />
|
||||
|
||||
<complexType name="MyMethodRequestObject">
|
||||
<complexContent>
|
||||
<extension base="test:DynamicData" />
|
||||
</complexContent>
|
||||
</complexType>
|
||||
|
||||
<complexType name="DynamicData" />
|
||||
|
||||
</schema>
|
||||
</types>
|
||||
|
||||
<service name="TestService">
|
||||
<port binding="test:TestBinding" name="TestPort">
|
||||
<soap:address location="http://localhost:8080/test-service" />
|
||||
</port>
|
||||
</service>
|
||||
|
||||
</definitions>
|
Loading…
Reference in New Issue
Block a user