php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #54312
Patch soap.c.patch revision 2011-03-19 06:30 UTC by tom at samplonius dot org

Patch soap.c.patch for SOAP related Bug #54312

Patch version 2011-03-19 06:30 UTC

Return to Bug #54312 | Download this patch
Patch Revisions:

Developer: tom@samplonius.org

--- soap.c.orig	2011-03-18 22:39:47.000000000 -0700
+++ soap.c	2011-03-18 22:43:35.000000000 -0700
@@ -1213,9 +1213,11 @@
 		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");
 			}
 		}
 
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Thu Apr 17 01:01:56 2014 UTC