xref: /PHP-7.0/ext/soap/tests/bugs/bug69462.phpt (revision bdf3bb66)
1--TEST--
2Bug #69462 (__soapCall with a SoapVar that has a namespace but no name crashes)
3--SKIPIF--
4<?php require_once('skipif.inc'); ?>
5--FILE--
6<?php
7$namespace = "http://example.com/ns";
8
9$client = new SoapClient(null, [ 'exceptions' => 1, 'location' => "", 'uri' => $namespace ]);
10
11$soapvar = new SoapVar(
12	array(
13		new SoapVar('value', XSD_STRING, null, null, null, $namespace)
14	),
15	SOAP_ENC_OBJECT, null, null, 'name', $namespace
16);
17
18try {
19	$client->__soapCall('method', array($soapvar));
20}
21catch (Exception $e) {
22	/* ignore any errors, we're testing for segmentation fault anyway */
23	echo "good";
24}
25?>
26--EXPECT--
27good
28