File tree Expand file tree Collapse file tree 3 files changed +73
-4
lines changed Expand file tree Collapse file tree 3 files changed +73
-4
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,10 @@ PHP NEWS
6
6
. Fixed bug #71041 (zend_signal_startup() needs ZEND_API).
7
7
(Valentin V. Bartenev)
8
8
9
+ - Soap:
10
+ . Fixed bug #77088 (Segfault when using SoapClient with null options).
11
+ (Laruence)
12
+
9
13
- Sockets:
10
14
. Fixed bug #77136 (Unsupported IPV6_RECVPKTINFO constants on macOS).
11
15
(Mizunashi Mana)
Original file line number Diff line number Diff line change @@ -1117,8 +1117,8 @@ PHP_METHOD(SoapServer, SoapServer)
1117
1117
1118
1118
SOAP_SERVER_BEGIN_CODE ();
1119
1119
1120
- if (zend_parse_parameters_throw (ZEND_NUM_ARGS (), "z|a" , & wsdl , & options ) == FAILURE ) {
1121
- return ;
1120
+ if (zend_parse_parameters (ZEND_NUM_ARGS (), "z|a" , & wsdl , & options ) == FAILURE ) {
1121
+ php_error_docref ( NULL , E_ERROR , "Invalid parameters" ) ;
1122
1122
}
1123
1123
1124
1124
if (Z_TYPE_P (wsdl ) != IS_STRING && Z_TYPE_P (wsdl ) != IS_NULL ) {
@@ -2273,8 +2273,8 @@ PHP_METHOD(SoapClient, SoapClient)
2273
2273
2274
2274
SOAP_CLIENT_BEGIN_CODE ();
2275
2275
2276
- if (zend_parse_parameters_throw (ZEND_NUM_ARGS (), "z|a" , & wsdl , & options ) == FAILURE ) {
2277
- return ;
2276
+ if (zend_parse_parameters (ZEND_NUM_ARGS (), "z|a" , & wsdl , & options ) == FAILURE ) {
2277
+ php_error_docref ( NULL , E_ERROR , "Invalid parameters" ) ;
2278
2278
}
2279
2279
2280
2280
if (Z_TYPE_P (wsdl ) != IS_STRING && Z_TYPE_P (wsdl ) != IS_NULL ) {
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ Bug #77088 (Segfault when using SoapClient with null options)
3
+ --SKIPIF--
4
+ <?php
5
+ require_once ('skipif.inc ' );
6
+ ?>
7
+ --FILE--
8
+ <?php
9
+
10
+ try
11
+ {
12
+ $ options = NULL ;
13
+ $ sClient = new SoapClient ("test.wsdl " , $ options );
14
+ }
15
+ catch (SoapFault $ e )
16
+ {
17
+ var_dump ($ e );
18
+ }
19
+
20
+ ?>
21
+ --EXPECTF--
22
+ Warning: SoapClient::SoapClient() expects parameter 2 to be array, null given in %sbug77088.php on line %d
23
+ object(SoapFault)#%d (%d) {
24
+ ["message":protected]=>
25
+ string(44) "SoapClient::SoapClient(): Invalid parameters"
26
+ ["string":"Exception":private]=>
27
+ string(0) ""
28
+ ["code":protected]=>
29
+ int(0)
30
+ ["file":protected]=>
31
+ string(%d) "%sbug77088.php"
32
+ ["line":protected]=>
33
+ int(6)
34
+ ["trace":"Exception":private]=>
35
+ array(1) {
36
+ [0]=>
37
+ array(6) {
38
+ ["file"]=>
39
+ string(%d) "%sbug77088.php"
40
+ ["line"]=>
41
+ int(6)
42
+ ["function"]=>
43
+ string(10) "SoapClient"
44
+ ["class"]=>
45
+ string(10) "SoapClient"
46
+ ["type"]=>
47
+ string(2) "->"
48
+ ["args"]=>
49
+ array(2) {
50
+ [0]=>
51
+ string(9) "test.wsdl"
52
+ [1]=>
53
+ NULL
54
+ }
55
+ }
56
+ }
57
+ ["previous":"Exception":private]=>
58
+ NULL
59
+ ["faultstring"]=>
60
+ string(44) "SoapClient::SoapClient(): Invalid parameters"
61
+ ["faultcode"]=>
62
+ string(6) "Client"
63
+ ["faultcodens"]=>
64
+ string(41) "http://schemas.xmlsoap.org/soap/envelope/"
65
+ }
You can’t perform that action at this time.
0 commit comments