Skip to content

Commit

Permalink
- Fixed bug #54312 (soap_version logic bug)
Browse files Browse the repository at this point in the history
  Patch by: tom at samplonius dot org
  • Loading branch information
felipensp committed Mar 19, 2011
1 parent a286fa3 commit 179b9d0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ext/soap/soap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1095,9 +1095,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");
}
}

Expand Down

0 comments on commit 179b9d0

Please sign in to comment.