From: David Soria Parra Date: Tue, 20 May 2008 13:16:47 +0000 (+0000) Subject: MFH: Allow non-long values for proxy_port, connection_timeout and convert them X-Git-Tag: BEFORE_NEW_PARAMETER_PARSE~183 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d5befc743d16e407a88ad5ad7f83a93045b6fad6;p=php MFH: Allow non-long values for proxy_port, connection_timeout and convert them --- diff --git a/ext/soap/soap.c b/ext/soap/soap.c index 4e635a42dc..50eae66e36 100644 --- a/ext/soap/soap.c +++ b/ext/soap/soap.c @@ -2381,8 +2381,8 @@ PHP_METHOD(SoapClient, SoapClient) if (zend_hash_find(ht, "proxy_host", sizeof("proxy_host"), (void**)&tmp) == SUCCESS && Z_TYPE_PP(tmp) == IS_STRING) { add_property_stringl(this_ptr, "_proxy_host", Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp), 1); - if (zend_hash_find(ht, "proxy_port", sizeof("proxy_port"), (void**)&tmp) == SUCCESS && - Z_TYPE_PP(tmp) == IS_LONG) { + if (zend_hash_find(ht, "proxy_port", sizeof("proxy_port"), (void**)&tmp) == SUCCESS) { + convert_to_long(*tmp); add_property_long(this_ptr, "_proxy_port", Z_LVAL_PP(tmp)); } if (zend_hash_find(ht, "proxy_login", sizeof("proxy_login"), (void**)&tmp) == SUCCESS && @@ -2463,8 +2463,9 @@ PHP_METHOD(SoapClient, SoapClient) add_property_long(this_ptr, "_features", Z_LVAL_PP(tmp)); } - if (zend_hash_find(ht, "connection_timeout", sizeof("connection_timeout"), (void**)&tmp) == SUCCESS && - Z_TYPE_PP(tmp) == IS_LONG && Z_LVAL_PP(tmp) > 0) { + if (zend_hash_find(ht, "connection_timeout", sizeof("connection_timeout"), (void**)&tmp) == SUCCESS) { + convert_to_long(*tmp); + if (Z_LVAL_PP(tmp) > 0) add_property_long(this_ptr, "_connection_timeout", Z_LVAL_PP(tmp)); }