From ec9297592e30d5fe347bc4de21f01b2c4e04df54 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 30 Aug 2019 17:03:04 +0200 Subject: [PATCH] Check zpp before other errors in SoapServer::addSoapHeader() --- ext/soap/soap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/soap/soap.c b/ext/soap/soap.c index 3f1e7186a4..f0d836e8f5 100644 --- a/ext/soap/soap.c +++ b/ext/soap/soap.c @@ -2012,6 +2012,10 @@ PHP_METHOD(SoapServer, addSoapHeader) SOAP_SERVER_BEGIN_CODE(); + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &fault, soap_header_class_entry) == FAILURE) { + return; + } + FETCH_THIS_SERVICE(service); if (!service || !service->soap_headers_ptr) { @@ -2019,10 +2023,6 @@ PHP_METHOD(SoapServer, addSoapHeader) return; } - if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &fault, soap_header_class_entry) == FAILURE) { - return; - } - p = service->soap_headers_ptr; while (*p != NULL) { p = &(*p)->next; -- 2.50.1