xref: /php-src/ext/soap/tests/bugs/bug69462.phpt (revision 7f2f0c00)
1--TEST--
2Bug #69462 (__soapCall with a SoapVar that has a namespace but no name crashes)
3--EXTENSIONS--
4soap
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