xref: /PHP-7.4/ext/soap/tests/bug70875.phpt (revision fd61666d)
1--TEST--
2SOAP Bug #70875 - Segmentation fault if wsdl has no targetNamespace attribute
3--SKIPIF--
4<?php require_once('skipif.inc'); ?>
5--INI--
6soap.wsdl_cache_enabled=0
7--FILE--
8<?php
9
10class bug70875 extends SOAPClient
11{
12	public function __doRequest($request, $location, $action, $version, $one_way = 0)
13	{
14		die("no SIGSEGV");
15	}
16}
17
18$c = new bug70875(__DIR__.'/bug70875.wsdl', [
19	'trace' => 1,
20	'classmap' => [
21		'TestService' => 'TestService',
22		'TestServiceRQ' => 'TestServiceRQ',
23		'RqHeader' => 'RqHeader',
24	],
25]);
26
27
28class TestService
29{
30    public $TestServiceRQ;
31}
32
33class TestServiceRQ
34{
35	public $RqHeader;
36}
37
38class RqHeader
39{
40}
41
42$r = new TestService();
43$r->TestServiceRQ = new TestServiceRQ();
44$r->TestServiceRQ->RqHeader = new RqHeader();
45
46$c->testService($r);
47
48?>
49--EXPECT--
50no SIGSEGV
51