bug77410.phpt 713 B

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