Skip to content

Commit e101ce0

Browse files
committed
review
1 parent 6eb1155 commit e101ce0

File tree

4 files changed

+7
-99
lines changed

4 files changed

+7
-99
lines changed

ext/soap/soap.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1309,7 +1309,8 @@ PHP_METHOD(SoapServer, handle)
13091309
*/
13101310

13111311
sapi_add_header("Content-Type: text/xml; charset=utf-8", sizeof("Content-Type: text/xml; charset=utf-8")-1, 1);
1312-
php_stream *stream = php_stream_open_wrapper_ex(service->sdl->source, "rb", REPORT_ERRORS, NULL, /* context */ NULL);
1312+
php_stream_context *context = php_stream_context_from_zval(NULL, false);
1313+
php_stream *stream = php_stream_open_wrapper_ex(service->sdl->source, "rb", REPORT_ERRORS, NULL, context);
13131314
if (stream) {
13141315
php_stream_passthru(stream);
13151316
php_stream_close(stream);

ext/soap/tests/SoapServer/handle_non_existing_WSDL_from_get_query.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ soap
66
WSDL
77
--FILE--
88
<?php
9-
$wsdlFile = __DIR__ . '/test_handle_non_existent_wsdl.wsdl';
9+
$wsdlFile = __DIR__ . '/test_handle_non_existent_wsdl_from_get_query.wsdl';
1010

1111
$wsdl = <<<'WSDL'
1212
<?xml version="1.0" ?>
@@ -72,7 +72,7 @@ $server->handle();
7272
?>
7373
--CLEAN--
7474
<?php
75-
$wsdlFile = __DIR__ . '/test_handle_non_existent_wsdl.wsdl';
75+
$wsdlFile = __DIR__ . '/test_handle_non_existent_wsdl_from_get_query.wsdl';
7676
@unlink($wsdlFile);
7777
?>
7878
--EXPECT--

ext/soap/tests/SoapServer/handle_non_existing_WSDL_from_get_query_disable_readfile.phpt

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ WSDL
88
disable_functions=readfile
99
--FILE--
1010
<?php
11-
$wsdlFile = __DIR__ . '/test_handle_non_existent_wsdl.wsdl';
11+
$wsdlFile = __DIR__ . '/test_handle_non_existent_wsdl_from_get_query_disable_readfile.wsdl';
1212

1313
$wsdl = <<<'WSDL'
1414
<?xml version="1.0" ?>
@@ -68,16 +68,12 @@ $options = [];
6868
$server = new SoapServer($wsdlFile, $options);
6969

7070
unlink($wsdlFile);
71+
$server->handle();
7172

72-
try {
73-
$server->handle();
74-
} catch (Throwable $e) {
75-
echo $e::class, ': ', $e->getMessage(), PHP_EOL;
76-
}
7773
?>
7874
--CLEAN--
7975
<?php
80-
$wsdlFile = __DIR__ . '/test_handle_non_existent_wsdl.wsdl';
76+
$wsdlFile = __DIR__ . '/test_handle_non_existent_wsdl_from_get_query_disable_readfile.wsdl';
8177
@unlink($wsdlFile);
8278
?>
8379
--EXPECT--

ext/soap/tests/SoapServer/handle_non_existing_WSDL_from_get_query_redefine_readfile.phpt

Lines changed: 0 additions & 89 deletions
This file was deleted.

0 commit comments

Comments
 (0)