Skip to content

Commit 95459a4

Browse files
committed
Merge branch 'PHP-5.6'
* PHP-5.6: slightly revised bug69462.phpt Test for bug #69462
2 parents 25e1b49 + bdf3bb6 commit 95459a4

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

ext/soap/tests/bugs/bug69462.phpt

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
--TEST--
2+
Bug #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+
18+
try {
19+
$client->__soapCall('method', array($soapvar));
20+
}
21+
catch (Exception $e) {
22+
/* ignore any errors, we're testing for segmentation fault anyway */
23+
echo "good";
24+
}
25+
?>
26+
--EXPECT--
27+
good

0 commit comments

Comments
 (0)