Skip to content

Commit b6f6d4b

Browse files
author
felipe
committed
- Fixed bug #54312 (soap_version logic bug)
Patch by: tom at samplonius dot org git-svn-id: http://svn.php.net/repository/php/php-src/php/php-src/trunk@309433 c90b9560-bf6c-de11-be94-00142212c4b1
1 parent 02e05da commit b6f6d4b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ext/soap/soap.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1095,9 +1095,11 @@ PHP_METHOD(SoapServer, SoapServer)
10951095
zval **tmp;
10961096

10971097
if (zend_hash_find(ht, "soap_version", sizeof("soap_version"), (void**)&tmp) == SUCCESS) {
1098-
if (Z_TYPE_PP(tmp) == IS_LONG ||
1099-
(Z_LVAL_PP(tmp) == SOAP_1_1 && Z_LVAL_PP(tmp) == SOAP_1_2)) {
1098+
if (Z_TYPE_PP(tmp) == IS_LONG &&
1099+
(Z_LVAL_PP(tmp) == SOAP_1_1 || Z_LVAL_PP(tmp) == SOAP_1_2)) {
11001100
version = Z_LVAL_PP(tmp);
1101+
} else {
1102+
php_error_docref(NULL TSRMLS_CC, E_ERROR, "'soap_version' option must be SOAP_1_1 or SOAP_1_2");
11011103
}
11021104
}
11031105

0 commit comments

Comments
 (0)