You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ext/soap: Convert bailouts to normal exception throwing in SoapServer::__constructor()
Use ValueErrors as the conditions checked are programming errors
Also narrow down bailout mechanism use in it as only the call to get_sdl()
requires us to use the bailout mechanism.
Copy file name to clipboardExpand all lines: ext/soap/tests/SoapServer/invalid-soap_version-option.phpt
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -25,5 +25,5 @@ try {
25
25
26
26
?>
27
27
--EXPECT--
28
-
<?xml version="1.0" encoding="UTF-8"?>
29
-
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>SoapServer::__construct(): 'soap_version' option must be SOAP_1_1 or SOAP_1_2</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
28
+
ValueError: SoapServer::__construct(): Argument #2 ($options) "soap_version" option must be SOAP_1_1 or SOAP_1_2
29
+
ValueError: SoapServer::__construct(): Argument #2 ($options) "soap_version" option must be SOAP_1_1 or SOAP_1_2
Copy file name to clipboardExpand all lines: ext/soap/tests/SoapServer/missing-options-non-wsdl-mode.phpt
+5-15Lines changed: 5 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -32,21 +32,11 @@ try {
32
32
echo$e::class, ': ', $e->getMessage(), PHP_EOL;
33
33
}
34
34
35
-
echo"\$options array only sets \"uri\" option\n";
36
-
$options = ['uri' => 'https://example.com'];
37
-
try {
38
-
$client = newSoapServer(null, $options);
39
-
} catch (Throwable$e) {
40
-
echo$e::class, ': ', $e->getMessage(), PHP_EOL;
41
-
}
42
-
try {
43
-
$client = newExtendedSoapServer(null, $options);
44
-
} catch (Throwable$e) {
45
-
echo$e::class, ': ', $e->getMessage(), PHP_EOL;
46
-
}
47
-
48
35
?>
49
36
--EXPECT--
50
37
$options not provided
51
-
<?xml version="1.0" encoding="UTF-8"?>
52
-
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>SoapServer::__construct(): 'uri' option is required in nonWSDL mode</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
38
+
ValueError: SoapServer::__construct(): Argument #2 ($options) must provide "uri" option as it is required in nonWSDL mode
39
+
ValueError: SoapServer::__construct(): Argument #2 ($options) must provide "uri" option as it is required in nonWSDL mode
40
+
Empty $options array
41
+
ValueError: SoapServer::__construct(): Argument #2 ($options) must provide "uri" option as it is required in nonWSDL mode
42
+
ValueError: SoapServer::__construct(): Argument #2 ($options) must provide "uri" option as it is required in nonWSDL mode
0 commit comments