Annotation of embedaddon/php/ext/soap/tests/bugs/bug42214.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Bug #42214 (SoapServer sends clients internal PHP errors)
3: --SKIPIF--
4: <?php require_once('skipif.inc'); ?>
5: --FILE--
6: <?php
7: $request = <<<EOF
8: <?xml version="1.0" encoding="UTF-8"?>
9: <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://localhost/server.php" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:test/></SOAP-ENV:Body></SOAP-ENV:Envelope>
10: EOF;
11:
12: function test() {
13: $a = $b;
14: obvious_error(); // will cause an error
15: }
16:
17: $server = new SoapServer(NULL, array('uri' =>'http://localhost/server.php',
18: 'send_errors'=>0));
19: $server->addFunction('test');
20: $server->handle($request);
21: ?>
22: --EXPECT--
23: <?xml version="1.0" encoding="UTF-8"?>
24: <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Internal Error</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>