com php-src: Use zpp_throw() in SOAP constructors : ext/soap/soap.c

From: Date: Tue, 05 Sep 2017 15:18:54 +0000
Subject: com php-src: Use zpp_throw() in SOAP constructors : ext/soap/soap.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-99270@lists.php.net to get a copy of this message
Commit: 002856cd5c955e0e017598e2b007868a67ee02a8 Author: Nikita Popov <nikita.ppv@gmail.com> Tue, 5 Sep 2017 17:18:31 +0200 Parents: 7340466372c10f623788df6add0a0bf71af01854 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=002856cd5c955e0e017598e2b007868a67ee02a8 Log: Use zpp_throw() in SOAP constructors These were probably overlooked because they use PHP4 style constructors :/ Changed paths: M ext/soap/soap.c Diff: diff --git a/ext/soap/soap.c b/ext/soap/soap.c index 32cc648..f1824e6 100644 --- a/ext/soap/soap.c +++ b/ext/soap/soap.c @@ -813,7 +813,7 @@ PHP_METHOD(SoapParam, SoapParam) size_t name_length; zval *this_ptr; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "zs", &data, &name, &name_length) == FAILURE) { + if (zend_parse_parameters_throw(ZEND_NUM_ARGS(), "zs", &data, &name, &name_length) == FAILURE) { return; } if (name_length == 0) { @@ -838,7 +838,7 @@ PHP_METHOD(SoapHeader, SoapHeader) zend_bool must_understand = 0; zval *this_ptr; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss|zbz", &ns, &ns_len, &name, &name_len, &data, &must_understand, &actor) == FAILURE) { + if (zend_parse_parameters_throw(ZEND_NUM_ARGS(), "ss|zbz", &ns, &ns_len, &name, &name_len, &data, &must_understand, &actor) == FAILURE) { return; } if (ns_len == 0) { @@ -878,7 +878,7 @@ PHP_METHOD(SoapFault, SoapFault) size_t fault_string_len, fault_actor_len = 0, name_len = 0, fault_code_len = 0; zval *code = NULL, *details = NULL, *headerfault = NULL, *this_ptr; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "zs|s!z!s!z", + if (zend_parse_parameters_throw(ZEND_NUM_ARGS(), "zs|s!z!s!z", &code, &fault_string, &fault_string_len, &fault_actor, &fault_actor_len, @@ -986,7 +986,7 @@ PHP_METHOD(SoapVar, SoapVar) char *stype = NULL, *ns = NULL, *name = NULL, *namens = NULL; size_t stype_len = 0, ns_len = 0, name_len = 0, namens_len = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "z!z|ssss", &data, &type, &stype, &stype_len, &ns, &ns_len, &name, &name_len, &namens, &namens_len) == FAILURE) { + if (zend_parse_parameters_throw(ZEND_NUM_ARGS(), "z!z|ssss", &data, &type, &stype, &stype_len, &ns, &ns_len, &name, &name_len, &namens, &namens_len) == FAILURE) { return; } @@ -1138,8 +1138,8 @@ PHP_METHOD(SoapServer, SoapServer) SOAP_SERVER_BEGIN_CODE(); - if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "z|a", &wsdl, &options) == FAILURE) { - php_error_docref(NULL, E_ERROR, "Invalid parameters"); + if (zend_parse_parameters_throw(ZEND_NUM_ARGS(), "z|a", &wsdl, &options) == FAILURE) { + return; } if (Z_TYPE_P(wsdl) != IS_STRING && Z_TYPE_P(wsdl) != IS_NULL) { @@ -2314,8 +2314,8 @@ PHP_METHOD(SoapClient, SoapClient) SOAP_CLIENT_BEGIN_CODE(); - if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "z|a", &wsdl, &options) == FAILURE) { - php_error_docref(NULL, E_ERROR, "Invalid parameters"); + if (zend_parse_parameters_throw(ZEND_NUM_ARGS(), "z|a", &wsdl, &options) == FAILURE) { + return; } if (Z_TYPE_P(wsdl) != IS_STRING && Z_TYPE_P(wsdl) != IS_NULL) {

« previous php.cvs (#99270) next »