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 &&
--- /dev/null
+--TEST--
+Bug #46760 (SoapClient doRequest fails when proxy is used)
+--FILE--
+<?php
+
+$client = new SoapClient(null, array('proxy_host' => "localhost",
+ 'proxy_port' => '8080',
+ 'login' => "user",
+ 'password' => "test",
+ 'uri' => 'mo:http://www.w3.org/',
+ 'location' => 'http://some.url'));
+var_dump($client->_proxy_port);
+
+?>
+--EXPECT--
+int(8080)