Skip to content

Commit eaeeb0f

Browse files
committed
Fix bug 61719 ext\soap\tests\bugs\bug31422.phpt fails
1 parent a688e69 commit eaeeb0f

File tree

2 files changed

+53
-1
lines changed

2 files changed

+53
-1
lines changed

ext/soap/tests/bugs/bug31422-win.phpt

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
--TEST--
2+
Bug #31422 (No Error-Logging on SoapServer-Side)
3+
--SKIPIF--
4+
<?php
5+
if (substr(PHP_OS, 0, 3) != 'WIN') {
6+
die('skip not valid for non windows');
7+
}
8+
require_once('skipif.inc');
9+
?>
10+
--INI--
11+
log_errors=1
12+
--FILE--
13+
<?php
14+
function Add($x,$y) {
15+
fopen();
16+
user_error("Hello", E_USER_ERROR);
17+
return $x+$y;
18+
}
19+
20+
$server = new SoapServer(null,array('uri'=>"http://testuri.org"));
21+
$server->addfunction("Add");
22+
23+
$HTTP_RAW_POST_DATA = <<<EOF
24+
<?xml version="1.0" encoding="ISO-8859-1"?>
25+
<SOAP-ENV:Envelope
26+
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
27+
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
28+
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
29+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
30+
xmlns:si="http://soapinterop.org/xsd">
31+
<SOAP-ENV:Body>
32+
<ns1:Add xmlns:ns1="http://testuri.org">
33+
<x xsi:type="xsd:int">22</x>
34+
<y xsi:type="xsd:int">33</y>
35+
</ns1:Add>
36+
</SOAP-ENV:Body>
37+
</SOAP-ENV:Envelope>
38+
EOF;
39+
40+
$server->handle($HTTP_RAW_POST_DATA);
41+
echo "ok\n";
42+
?>
43+
--EXPECTF--
44+
<?xml version="1.0" encoding="UTF-8"?>
45+
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Hello</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
46+
PHP Warning: fopen() expects at least 2 parameters, 0 given in %sbug31422-win.php on line %d
47+
PHP Fatal error: Hello in %sbug31422-win.php on line %d

ext/soap/tests/bugs/bug31422.phpt

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
--TEST--
22
Bug #31422 (No Error-Logging on SoapServer-Side)
33
--SKIPIF--
4-
<?php require_once('skipif.inc'); ?>
4+
<?php
5+
if (substr(PHP_OS, 0, 3) == 'WIN') {
6+
die('skip not valid for windows');
7+
}
8+
require_once('skipif.inc');
9+
?>
510
--INI--
611
log_errors=1
712
error_log=

0 commit comments

Comments
 (0)