. Fixed bug #77273 (array_walk_recursive corrupts value types leading to PDO
failure). (Nikita)
+- SOAP:
+ . Fixed bug #77410 (Segmentation Fault when executing method with an empty
+ parameter). (Nikita)
+
- Sockets:
. Fixed bug #76839 (socket_recvfrom may return an invalid 'from' address
on MacOS). (Michael Meyer)
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);
--- /dev/null
+--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>
--- /dev/null
+<?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>