From: David Soria Parra Date: Tue, 20 May 2008 13:15:01 +0000 (+0000) Subject: Allow non-long values for proxy_port, connection_timeout and convert them X-Git-Tag: BEFORE_HEAD_NS_CHANGE~1713 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=60b27ed62ac3245b01d95340e4bbba795b7901e6;p=php 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 c23a96d6b4..c6634a0ba5 100644 --- a/ext/soap/soap.c +++ b/ext/soap/soap.c @@ -2758,8 +2758,8 @@ PHP_METHOD(SoapClient, SoapClient) } else { client->proxy_host = soap_unicode_to_string(Z_USTRVAL_PP(tmp), Z_USTRLEN_PP(tmp) TSRMLS_CC); } - if (zend_ascii_hash_find(ht, "proxy_port", sizeof("proxy_port"), (void**)&tmp) == SUCCESS && - Z_TYPE_PP(tmp) == IS_LONG) { + if (zend_ascii_hash_find(ht, "proxy_port", sizeof("proxy_port"), (void**)&tmp) == SUCCESS) { + convert_to_long(*tmp); client->proxy_port = Z_LVAL_PP(tmp); } if (zend_ascii_hash_find(ht, "proxy_login", sizeof("proxy_login"), (void**)&tmp) == SUCCESS && @@ -2849,9 +2849,10 @@ PHP_METHOD(SoapClient, SoapClient) client->features = Z_LVAL_PP(tmp); } - if (zend_ascii_hash_find(ht, "connection_timeout", sizeof("connection_timeout"), (void**)&tmp) == SUCCESS && - Z_TYPE_PP(tmp) == IS_LONG && Z_LVAL_PP(tmp) >= 0) { - client->connection_timeout = Z_LVAL_PP(tmp); + if (zend_ascii_hash_find(ht, "connection_timeout", sizeof("connection_timeout"), (void**)&tmp) == SUCCESS) { + convert_to_long(*tmp); + if(Z_LVAL_PP(tmp) >= 0) + client->connection_timeout = Z_LVAL_PP(tmp); } if (context) {