1
0
mirror of https://github.com/php/php-src.git synced 2026-04-29 19:23:22 +02:00
Files
archived-php-src/ext/soap/tests/SoapClient/soapCall-invalid-headers.phpt
2024-06-19 02:23:08 +01:00

29 lines
577 B
PHP

--TEST--
SoapClient::__soapCall with invalid headers
--EXTENSIONS--
soap
--FILE--
<?php
/* Bypass constructor */
class ExtendedSoapClient extends SoapClient {
public function __construct() {}
}
$client = new ExtendedSoapClient();
$header = new SoapHeader('namespace', 'name');
$headers = [
$header,
'giberrish',
];
try {
$client->__soapCall('function', ['arg'], ['options'], $headers);
} catch (Throwable $e) {
echo $e::class, ': ', $e->getMessage(), PHP_EOL;
}
?>
--EXPECTF--
Fatal error: SoapClient::__soapCall(): Invalid SOAP header in %s on line %d