]> granicus.if.org Git - php/commitdiff
- Fixed bug #54312 (soap_version logic bug)
authorFelipe Pena <felipe@php.net>
Sat, 19 Mar 2011 17:36:01 +0000 (17:36 +0000)
committerFelipe Pena <felipe@php.net>
Sat, 19 Mar 2011 17:36:01 +0000 (17:36 +0000)
  Patch by: tom at samplonius dot org

ext/soap/soap.c

index c875f5a0ac824aacd12d9667bddbcd3b45d8348d..0001e3c3498084534dcecf450bfe3033465c0721 100644 (file)
@@ -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");
                        }
                }