summaryrefslogtreecommitdiff
path: root/ext/soap/soap.c
diff options
context:
space:
mode:
authorDavid Soria Parra <dsp@php.net>2008-05-20 13:16:47 +0000
committerDavid Soria Parra <dsp@php.net>2008-05-20 13:16:47 +0000
commitd5befc743d16e407a88ad5ad7f83a93045b6fad6 (patch)
tree3609f38437023fa9ec3e81007089d49960c6ee7e /ext/soap/soap.c
parent50983e372c529a704dd62e659c3d63043d3fb7a4 (diff)
downloadphp-git-d5befc743d16e407a88ad5ad7f83a93045b6fad6.tar.gz
MFH: Allow non-long values for proxy_port, connection_timeout and convert them
Diffstat (limited to 'ext/soap/soap.c')
-rw-r--r--ext/soap/soap.c9
1 files changed, 5 insertions, 4 deletions
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));
}