xref: /PHP-7.4/ext/soap/tests/bug77410.phpt (revision 361d3ede)
1--TEST--
2Bug #77410: Segmentation Fault when executing method with an empty parameter
3--SKIPIF--
4<?php require_once('skipif.inc'); ?>
5--FILE--
6<?php
7
8$client = new class(__DIR__ . '/bug77410.wsdl', [
9    'cache_wsdl' => WSDL_CACHE_NONE,
10    'trace' => 1,
11]) extends SoapClient {
12    public function __doRequest($request, $location, $action, $version, $one_way = 0) {
13        echo $request, "\n";
14        return '';
15    }
16};
17
18$client->MyMethod([
19    'parameter' => [],
20]);
21
22?>
23--EXPECT--
24<?xml version="1.0" encoding="UTF-8"?>
25<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>
26