Skip to content

Commit ec92975

Browse files
committed
Check zpp before other errors in SoapServer::addSoapHeader()
1 parent 82d9f14 commit ec92975

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ext/soap/soap.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2012,17 +2012,17 @@ PHP_METHOD(SoapServer, addSoapHeader)
20122012

20132013
SOAP_SERVER_BEGIN_CODE();
20142014

2015+
if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &fault, soap_header_class_entry) == FAILURE) {
2016+
return;
2017+
}
2018+
20152019
FETCH_THIS_SERVICE(service);
20162020

20172021
if (!service || !service->soap_headers_ptr) {
20182022
php_error_docref(NULL, E_WARNING, "The SoapServer::addSoapHeader function may be called only during SOAP request processing");
20192023
return;
20202024
}
20212025

2022-
if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &fault, soap_header_class_entry) == FAILURE) {
2023-
return;
2024-
}
2025-
20262026
p = service->soap_headers_ptr;
20272027
while (*p != NULL) {
20282028
p = &(*p)->next;

0 commit comments

Comments
 (0)