diff options
| author | Felipe Pena <felipe@php.net> | 2011-03-19 17:36:01 +0000 |
|---|---|---|
| committer | Felipe Pena <felipe@php.net> | 2011-03-19 17:36:01 +0000 |
| commit | ab7992fab275126c1f41e941bf8da73559f749e3 (patch) | |
| tree | a872fa7f8fcf57f5630df0d7d766522b9117eac2 | |
| parent | 5b55a186228146de79f1d65ce7997ccbf6e2dec1 (diff) | |
| download | php-git-ab7992fab275126c1f41e941bf8da73559f749e3.tar.gz | |
- Fixed bug #54312 (soap_version logic bug)
Patch by: tom at samplonius dot org
| -rw-r--r-- | ext/soap/soap.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/soap/soap.c b/ext/soap/soap.c index 3335f75a3a..e7275c1c9d 100644 --- a/ext/soap/soap.c +++ b/ext/soap/soap.c @@ -1213,9 +1213,11 @@ PHP_METHOD(SoapServer, SoapServer) zval **tmp; if (zend_hash_find(ht, "soap_version", sizeof("soap_version"), (void**)&tmp) == SUCCESS) { - if (Z_TYPE_PP(tmp) == IS_LONG || - (Z_LVAL_PP(tmp) == SOAP_1_1 && Z_LVAL_PP(tmp) == SOAP_1_2)) { + if (Z_TYPE_PP(tmp) == IS_LONG && + (Z_LVAL_PP(tmp) == SOAP_1_1 || Z_LVAL_PP(tmp) == SOAP_1_2)) { version = Z_LVAL_PP(tmp); + } else { + php_error_docref(NULL TSRMLS_CC, E_ERROR, "'soap_version' option must be SOAP_1_1 or SOAP_1_2"); } } |
