smart_str_appendl(str,const,sizeof(const)-1)
/* Proxy HTTP Authentication */
-int proxy_authentication(zval* this_ptr, smart_str* soap_headers TSRMLS_DC)
+int proxy_authentication(zval* this_ptr, smart_str* soap_headers)
{
- zval **login, **password;
+ zval *login, *password;
- if ((login = zend_hash_str_find(Z_OBJPROP_P(this_ptr), "_proxy_login", sizeof("_proxy_login")-1)) != NULL) {
- if (zend_hash_find(Z_OBJPROP_P(this_ptr), "_proxy_login", sizeof("_proxy_login"), (void **)&login) == SUCCESS &&
- Z_TYPE_PP(login) == IS_STRING) {
- unsigned char* buf;
- int len;
++ if ((login = zend_hash_str_find(Z_OBJPROP_P(this_ptr), "_proxy_login", sizeof("_proxy_login")-1)) != NULL &&
++ Z_TYPE_P(login) == IS_STRING) {
+ zend_string *buf;
smart_str auth = {0};
- smart_str_appendl(&auth, Z_STRVAL_PP(login), Z_STRLEN_PP(login));
+ smart_str_appendl(&auth, Z_STRVAL_P(login), Z_STRLEN_P(login));
smart_str_appendc(&auth, ':');
- if ((password = zend_hash_str_find(Z_OBJPROP_P(this_ptr), "_proxy_password", sizeof("_proxy_password")-1)) != NULL) {
- if (zend_hash_find(Z_OBJPROP_P(this_ptr), "_proxy_password", sizeof("_proxy_password"), (void **)&password) == SUCCESS &&
- Z_TYPE_PP(password) == IS_STRING) {
- smart_str_appendl(&auth, Z_STRVAL_PP(password), Z_STRLEN_PP(password));
++ if ((password = zend_hash_str_find(Z_OBJPROP_P(this_ptr), "_proxy_password", sizeof("_proxy_password")-1)) != NULL &&
++ Z_TYPE_P(password) == IS_STRING) {
+ smart_str_appendl(&auth, Z_STRVAL_P(password), Z_STRLEN_P(password));
}
smart_str_0(&auth);
- buf = php_base64_encode((unsigned char*)auth.c, auth.len, &len);
+ buf = php_base64_encode((unsigned char*)auth.s->val, auth.s->len);
smart_str_append_const(soap_headers, "Proxy-Authorization: Basic ");
- smart_str_appendl(soap_headers, (char*)buf, len);
+ smart_str_appendl(soap_headers, (char*)buf->val, buf->len);
smart_str_append_const(soap_headers, "\r\n");
- efree(buf);
+ zend_string_release(buf);
smart_str_free(&auth);
return 1;
}
}
/* HTTP Authentication */
-int basic_authentication(zval* this_ptr, smart_str* soap_headers TSRMLS_DC)
+int basic_authentication(zval* this_ptr, smart_str* soap_headers)
{
- zval **login, **password;
+ zval *login, *password;
- if (zend_hash_find(Z_OBJPROP_P(this_ptr), "_login", sizeof("_login"), (void **)&login) == SUCCESS &&
- Z_TYPE_PP(login) == IS_STRING &&
- !zend_hash_exists(Z_OBJPROP_P(this_ptr), "_digest", sizeof("_digest"))) {
- unsigned char* buf;
- int len;
+ if ((login = zend_hash_str_find(Z_OBJPROP_P(this_ptr), "_login", sizeof("_login")-1)) != NULL &&
- !zend_hash_str_exists(Z_OBJPROP_P(this_ptr), "_digest", sizeof("_digest")-1)) {
++ Z_TYPE_P(login) == IS_STRING &&
++ !zend_hash_str_exists(Z_OBJPROP_P(this_ptr), "_digest", sizeof("_digest")-1)) {
+ zend_string* buf;
smart_str auth = {0};
- smart_str_appendl(&auth, Z_STRVAL_PP(login), Z_STRLEN_PP(login));
+ smart_str_appendl(&auth, Z_STRVAL_P(login), Z_STRLEN_P(login));
smart_str_appendc(&auth, ':');
- if ((password = zend_hash_str_find(Z_OBJPROP_P(this_ptr), "_password", sizeof("_password")-1)) != NULL) {
- if (zend_hash_find(Z_OBJPROP_P(this_ptr), "_password", sizeof("_password"), (void **)&password) == SUCCESS &&
- Z_TYPE_PP(password) == IS_STRING) {
- smart_str_appendl(&auth, Z_STRVAL_PP(password), Z_STRLEN_PP(password));
++ if ((password = zend_hash_str_find(Z_OBJPROP_P(this_ptr), "_password", sizeof("_password")-1)) != NULL &&
++ Z_TYPE_P(password) == IS_STRING) {
+ smart_str_appendl(&auth, Z_STRVAL_P(password), Z_STRLEN_P(password));
}
smart_str_0(&auth);
- buf = php_base64_encode((unsigned char*)auth.c, auth.len, &len);
+ buf = php_base64_encode((unsigned char*)auth.s->val, auth.s->len);
smart_str_append_const(soap_headers, "Authorization: Basic ");
- smart_str_appendl(soap_headers, (char*)buf, len);
+ smart_str_appendl(soap_headers, (char*)buf->val, buf->len);
smart_str_append_const(soap_headers, "\r\n");
- efree(buf);
+ zend_string_release(buf);
smart_str_free(&auth);
return 1;
}
smart_str_append_unsigned(&soap_headers, phpurl->port);
}
if (!http_1_1 ||
- (zend_hash_find(Z_OBJPROP_P(this_ptr), "_keep_alive", sizeof("_keep_alive"), (void **)&tmp) == SUCCESS &&
- (Z_TYPE_PP(tmp) == IS_BOOL || Z_TYPE_PP(tmp) == IS_LONG) &&
- Z_LVAL_PP(tmp) == 0)) {
+ ((tmp = zend_hash_str_find(Z_OBJPROP_P(this_ptr), "_keep_alive", sizeof("_keep_alive")-1)) != NULL &&
- Z_LVAL_P(tmp) == 0)) {
++ (Z_TYPE_P(tmp) == IS_FALSE || (Z_TYPE_P(tmp) == IS_LONG && Z_LVAL_P(tmp) == 0)))) {
smart_str_append_const(&soap_headers, "\r\n"
"Connection: close\r\n");
} else {
}
/* Send cookies along with request */
- if ((cookies = zend_hash_str_find(Z_OBJPROP_P(this_ptr), "_cookies", sizeof("_cookies")-1)) != NULL) {
- if (zend_hash_find(Z_OBJPROP_P(this_ptr), "_cookies", sizeof("_cookies"), (void **)&cookies) == SUCCESS &&
- Z_TYPE_PP(cookies) == IS_ARRAY) {
- zval **data;
- char *key;
- uint key_len;
++ if ((cookies = zend_hash_str_find(Z_OBJPROP_P(this_ptr), "_cookies", sizeof("_cookies")-1)) != NULL &&
++ Z_TYPE_P(cookies) == IS_ARRAY) {
+ zval *data;
+ zend_string *key;
int i, n;
has_cookies = 1;
smart_str_append_const(&soap_headers, "\r\n");
smart_str_0(&soap_headers);
- if (zend_hash_find(Z_OBJPROP_P(this_ptr), "trace", sizeof("trace"), (void **) &trace) == SUCCESS &&
- (Z_TYPE_PP(trace) == IS_BOOL || Z_TYPE_PP(trace) == IS_LONG) && Z_LVAL_PP(trace) != 0) {
- add_property_stringl(this_ptr, "__last_request_headers", soap_headers.c, soap_headers.len, 1);
+ if ((trace = zend_hash_str_find(Z_OBJPROP_P(this_ptr), "trace", sizeof("trace")-1)) != NULL &&
- Z_LVAL_P(trace) > 0) {
++ (Z_TYPE_P(trace) == IS_TRUE || (Z_TYPE_P(trace) == IS_LONG && Z_LVAL_P(trace) != 0))) {
+ add_property_stringl(this_ptr, "__last_request_headers", soap_headers.s->val, soap_headers.s->len);
}
smart_str_appendl(&soap_headers, request, request_size);
smart_str_0(&soap_headers);
return FALSE;
}
- if (zend_hash_find(Z_OBJPROP_P(this_ptr), "trace", sizeof("trace"), (void **) &trace) == SUCCESS &&
- (Z_TYPE_PP(trace) == IS_BOOL || Z_TYPE_PP(trace) == IS_LONG) && Z_LVAL_PP(trace) != 0) {
- add_property_stringl(this_ptr, "__last_response_headers", http_headers, http_header_size, 1);
+ if ((trace = zend_hash_str_find(Z_OBJPROP_P(this_ptr), "trace", sizeof("trace")-1)) != NULL &&
- Z_LVAL_P(trace) > 0) {
++ (Z_TYPE_P(trace) == IS_TRUE || (Z_TYPE_P(trace) == IS_LONG && Z_LVAL_P(trace) != 0))) {
+ add_property_str(this_ptr, "__last_response_headers", zend_string_copy(http_headers));
}
/* Check to see what HTTP status was sent */
we shouldn't be changing urls so path dont
matter too much
*/
- cookie_itt = strstr(http_headers,"Set-Cookie: ");
+ cookie_itt = strstr(http_headers->val, "Set-Cookie: ");
while (cookie_itt) {
- char *end_pos, *cookie;
+ char *cookie;
char *eqpos, *sempos;
- zval **cookies;
-
- if (zend_hash_find(Z_OBJPROP_P(this_ptr), "_cookies", sizeof("_cookies"), (void **)&cookies) == FAILURE ||
- Z_TYPE_PP(cookies) != IS_ARRAY) {
- zval *tmp_cookies;
- MAKE_STD_ZVAL(tmp_cookies);
- array_init(tmp_cookies);
- zend_hash_update(Z_OBJPROP_P(this_ptr), "_cookies", sizeof("_cookies"), &tmp_cookies, sizeof(zval *), (void **)&cookies);
+ zval *cookies;
+
- if ((cookies = zend_hash_str_find(Z_OBJPROP_P(this_ptr), "_cookies", sizeof("_cookies")-1)) == NULL) {
++ if ((cookies = zend_hash_str_find(Z_OBJPROP_P(this_ptr), "_cookies", sizeof("_cookies")-1)) == NULL ||
++ Z_TYPE_P(cookies) != IS_ARRAY) {
+ zval tmp_cookies;
+ array_init(&tmp_cookies);
+ cookies = zend_hash_str_update(Z_OBJPROP_P(this_ptr), "_cookies", sizeof("_cookies")-1, &tmp_cookies);
}
- end_pos = strstr(cookie_itt,"\r\n");
cookie = get_http_header_value(cookie_itt,"Set-Cookie: ");
eqpos = strstr(cookie, "=");
return FALSE;
}
- if (zend_hash_find(Z_OBJPROP_P(this_ptr), "trace", sizeof("trace"), (void **) &trace) == SUCCESS &&
- (Z_LVAL_PP(trace) == IS_BOOL || Z_LVAL_PP(trace) == IS_LONG) && Z_LVAL_PP(trace) != 0) {
- add_property_stringl(this_ptr, "__last_request", buf, buf_size, 1);
+ if ((trace = zend_hash_str_find(Z_OBJPROP_P(this_ptr), "trace", sizeof("trace")-1)) != NULL &&
- Z_TYPE_P(trace) == IS_LONG && Z_LVAL_P(trace) > 0) {
++ (Z_TYPE_P(trace) == IS_TRUE || (Z_TYPE_P(trace) == IS_LONG && Z_LVAL_P(trace) != 0))) {
+ add_property_stringl(this_ptr, "__last_request", buf, buf_size);
}
- INIT_ZVAL(func);
- ZVAL_STRINGL(&func,"__doRequest",sizeof("__doRequest")-1,0);
- ALLOC_INIT_ZVAL(params[0]);
- ZVAL_STRINGL(params[0], buf, buf_size, 1);
- ALLOC_INIT_ZVAL(params[1]);
+ ZVAL_STRINGL(&func,"__doRequest",sizeof("__doRequest")-1);
+ ZVAL_STRINGL(¶ms[0], buf, buf_size);
if (location == NULL) {
- ZVAL_NULL(params[1]);
+ ZVAL_NULL(¶ms[1]);
} else {
- ZVAL_STRING(params[1], location, 1);
+ ZVAL_STRING(¶ms[1], location);
}
- ALLOC_INIT_ZVAL(params[2]);
if (action == NULL) {
- ZVAL_NULL(params[2]);
+ ZVAL_NULL(¶ms[2]);
} else {
- ZVAL_STRING(params[2], action, 1);
+ ZVAL_STRING(¶ms[2], action);
}
- ALLOC_INIT_ZVAL(params[3]);
- ZVAL_LONG(params[3], version);
+ ZVAL_LONG(¶ms[3], version);
+ ZVAL_LONG(¶ms[4], one_way);
- ALLOC_INIT_ZVAL(params[4]);
- ZVAL_LONG(params[4], one_way);
-
- if (call_user_function(NULL, &this_ptr, &func, response, 5, params TSRMLS_CC) != SUCCESS) {
- add_soap_fault(this_ptr, "Client", "SoapClient::__doRequest() failed", NULL, NULL TSRMLS_CC);
+ if (call_user_function(NULL, this_ptr, &func, response, 5, params) != SUCCESS) {
+ add_soap_fault(this_ptr, "Client", "SoapClient::__doRequest() failed", NULL, NULL);
ret = FALSE;
} else if (Z_TYPE_P(response) != IS_STRING) {
- if (zend_hash_find(Z_OBJPROP_P(this_ptr), "__soap_fault", sizeof("__soap_fault"), (void **) &fault) == FAILURE) {
- add_soap_fault(this_ptr, "Client", "SoapClient::__doRequest() returned non string value", NULL, NULL TSRMLS_CC);
+ if ((fault = zend_hash_str_find(Z_OBJPROP_P(this_ptr), "__soap_fault", sizeof("__soap_fault")-1)) == NULL) {
+ add_soap_fault(this_ptr, "Client", "SoapClient::__doRequest() returned non string value", NULL, NULL);
}
ret = FALSE;
- } else if (zend_hash_find(Z_OBJPROP_P(this_ptr), "trace", sizeof("trace"), (void **) &trace) == SUCCESS &&
- (Z_LVAL_PP(trace) == IS_BOOL || Z_LVAL_PP(trace) == IS_LONG) && Z_LVAL_PP(trace) != 0) {
- add_property_stringl(this_ptr, "__last_response", Z_STRVAL_P(response), Z_STRLEN_P(response), 1);
+ } else if ((trace = zend_hash_str_find(Z_OBJPROP_P(this_ptr), "trace", sizeof("trace")-1)) != NULL &&
- Z_TYPE_P(trace) == IS_LONG && Z_LVAL_P(trace) > 0) {
++ (Z_TYPE_P(trace) == IS_TRUE || (Z_TYPE_P(trace) == IS_LONG && Z_LVAL_P(trace) != 0))) {
+ add_property_str(this_ptr, "__last_response", zend_string_copy(Z_STR_P(response)));
}
+ zval_ptr_dtor(&func);
zval_ptr_dtor(¶ms[4]);
zval_ptr_dtor(¶ms[3]);
zval_ptr_dtor(¶ms[2]);
SOAP_CLIENT_BEGIN_CODE();
- if ((trace = zend_hash_str_find(Z_OBJPROP_P(this_ptr), "trace", sizeof("trace")-1)) != NULL
- && Z_LVAL_P(trace) > 0) {
- if (zend_hash_find(Z_OBJPROP_P(this_ptr), "trace", sizeof("trace"), (void **) &trace) == SUCCESS &&
- (Z_LVAL_PP(trace) == IS_BOOL || Z_LVAL_PP(trace) == IS_LONG) && Z_LVAL_PP(trace) != 0) {
- zend_hash_del(Z_OBJPROP_P(this_ptr), "__last_request", sizeof("__last_request"));
- zend_hash_del(Z_OBJPROP_P(this_ptr), "__last_response", sizeof("__last_response"));
++ if ((trace = zend_hash_str_find(Z_OBJPROP_P(this_ptr), "trace", sizeof("trace")-1)) != NULL &&
++ (Z_TYPE_P(trace) == IS_TRUE || (Z_TYPE_P(trace) == IS_LONG && Z_LVAL_P(trace) != 0))) {
+ zend_hash_str_del(Z_OBJPROP_P(this_ptr), "__last_request", sizeof("__last_request")-1);
+ zend_hash_str_del(Z_OBJPROP_P(this_ptr), "__last_response", sizeof("__last_response")-1);
}
- if ((tmp = zend_hash_str_find(Z_OBJPROP_P(this_ptr), "_soap_version", sizeof("_soap_version")-1)) != NULL
- && Z_LVAL_P(tmp) == SOAP_1_2) {
- if (zend_hash_find(Z_OBJPROP_P(this_ptr), "_soap_version", sizeof("_soap_version"), (void **) &tmp) == SUCCESS &&
- Z_TYPE_PP(tmp) == IS_LONG && Z_LVAL_PP(tmp) == SOAP_1_2) {
++ if ((tmp = zend_hash_str_find(Z_OBJPROP_P(this_ptr), "_soap_version", sizeof("_soap_version")-1)) != NULL &&
++ Z_TYPE_P(tmp) == IS_LONG && Z_LVAL_P(tmp) == SOAP_1_2) {
soap_version = SOAP_1_2;
} else {
soap_version = SOAP_1_1;
smart_str_free(&error);
}
} else {
- zval **uri;
+ zval *uri;
smart_str action = {0};
- if ((uri = zend_hash_str_find(Z_OBJPROP_P(this_ptr), "uri", sizeof("uri")-1)) == NULL) {
- if (zend_hash_find(Z_OBJPROP_P(this_ptr), "uri", sizeof("uri"), (void *)&uri) == FAILURE || Z_TYPE_PP(uri) != IS_STRING) {
- add_soap_fault(this_ptr, "Client", "Error finding \"uri\" property", NULL, NULL TSRMLS_CC);
++ if ((uri = zend_hash_str_find(Z_OBJPROP_P(this_ptr), "uri", sizeof("uri")-1)) == NULL || Z_TYPE_P(uri) != IS_STRING) {
+ add_soap_fault(this_ptr, "Client", "Error finding \"uri\" property", NULL, NULL);
} else if (location == NULL) {
- add_soap_fault(this_ptr, "Client", "Error could not find \"location\" property", NULL, NULL TSRMLS_CC);
+ add_soap_fault(this_ptr, "Client", "Error could not find \"location\" property", NULL, NULL);
} else {
if (call_uri == NULL) {
- call_uri = Z_STRVAL_PP(uri);
+ call_uri = Z_STRVAL_P(uri);
}
- request = serialize_function_call(this_ptr, NULL, function, call_uri, real_args, arg_count, soap_version, soap_headers TSRMLS_CC);
+ request = serialize_function_call(this_ptr, NULL, function, call_uri, real_args, arg_count, soap_version, soap_headers);
if (soap_action == NULL) {
smart_str_appends(&action, call_uri);
return;
}
- if ((tmp = zend_hash_str_find(Z_OBJPROP_P(getThis()), "__last_request", sizeof("__last_request")-1)) != NULL) {
- if (zend_hash_find(Z_OBJPROP_P(this_ptr), "__last_request", sizeof("__last_request"), (void **)&tmp) == SUCCESS &&
- Z_TYPE_PP(tmp) == IS_STRING) {
- RETURN_STRINGL(Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp), 1);
++ if ((tmp = zend_hash_str_find(Z_OBJPROP_P(getThis()), "__last_request", sizeof("__last_request")-1)) != NULL &&
++ Z_TYPE_P(tmp) == IS_STRING) {
+ RETURN_STR(zend_string_copy(Z_STR_P(tmp)));
}
RETURN_NULL();
}
if (zend_parse_parameters_none() == FAILURE) {
return;
}
-
- if (zend_hash_find(Z_OBJPROP_P(this_ptr), "__last_response", sizeof("__last_response"), (void **)&tmp) == SUCCESS &&
- Z_TYPE_PP(tmp) == IS_STRING) {
- RETURN_STRINGL(Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp), 1);
+
- if ((tmp = zend_hash_str_find(Z_OBJPROP_P(getThis()), "__last_response", sizeof("__last_response")-1)) != NULL) {
++ if ((tmp = zend_hash_str_find(Z_OBJPROP_P(getThis()), "__last_response", sizeof("__last_response")-1)) != NULL &&
++ Z_TYPE_P(tmp) == IS_STRING) {
+ RETURN_STR(zend_string_copy(Z_STR_P(tmp)));
}
RETURN_NULL();
}
if (zend_parse_parameters_none() == FAILURE) {
return;
}
-
- if (zend_hash_find(Z_OBJPROP_P(this_ptr), "__last_request_headers", sizeof("__last_request_headers"), (void **)&tmp) == SUCCESS &&
- Z_TYPE_PP(tmp) == IS_STRING) {
- RETURN_STRINGL(Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp), 1);
+
- if ((tmp = zend_hash_str_find(Z_OBJPROP_P(getThis()), "__last_request_headers", sizeof("__last_request_headers")-1)) != NULL) {
++ if ((tmp = zend_hash_str_find(Z_OBJPROP_P(getThis()), "__last_request_headers", sizeof("__last_request_headers")-1)) != NULL &&
++ Z_TYPE_P(tmp) == IS_STRING) {
+ RETURN_STR(zend_string_copy(Z_STR_P(tmp)));
}
RETURN_NULL();
}
return;
}
- if ((tmp = zend_hash_str_find(Z_OBJPROP_P(getThis()), "__last_response_headers", sizeof("__last_response_headers")-1)) != NULL) {
- if (zend_hash_find(Z_OBJPROP_P(this_ptr), "__last_response_headers", sizeof("__last_response_headers"), (void **)&tmp) == SUCCESS &&
- Z_TYPE_PP(tmp) == IS_STRING) {
- RETURN_STRINGL(Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp), 1);
++ if ((tmp = zend_hash_str_find(Z_OBJPROP_P(getThis()), "__last_response_headers", sizeof("__last_response_headers")-1)) != NULL &&
++ Z_TYPE_P(tmp) == IS_STRING) {
+ RETURN_STR(zend_string_copy(Z_STR_P(tmp)));
}
RETURN_NULL();
}
}
if (val == NULL) {
- if ((cookies = zend_hash_str_find(Z_OBJPROP_P(this_ptr), "_cookies", sizeof("_cookies")-1)) != NULL) {
- if (zend_hash_find(Z_OBJPROP_P(this_ptr), "_cookies", sizeof("_cookies"), (void **)&cookies) == SUCCESS &&
- Z_TYPE_PP(cookies) == IS_ARRAY) {
- zend_hash_del(Z_ARRVAL_PP(cookies), name, name_len+1);
++ if ((cookies = zend_hash_str_find(Z_OBJPROP_P(this_ptr), "_cookies", sizeof("_cookies")-1)) != NULL &&
++ Z_TYPE_P(cookies) == IS_ARRAY) {
+ zend_hash_str_del(Z_ARRVAL_P(cookies), name, name_len);
}
} else {
- zval *zcookie;
+ zval zcookie;
- if ((cookies = zend_hash_str_find(Z_OBJPROP_P(this_ptr), "_cookies", sizeof("_cookies")-1)) == NULL) {
- if (zend_hash_find(Z_OBJPROP_P(this_ptr), "_cookies", sizeof("_cookies"), (void **)&cookies) == FAILURE ||
- Z_TYPE_PP(cookies) != IS_ARRAY) {
- zval *tmp_cookies;
++ if ((cookies = zend_hash_str_find(Z_OBJPROP_P(this_ptr), "_cookies", sizeof("_cookies")-1)) == NULL ||
++ Z_TYPE_P(cookies) != IS_ARRAY) {
+ zval tmp_cookies;
- MAKE_STD_ZVAL(tmp_cookies);
- array_init(tmp_cookies);
- zend_hash_update(Z_OBJPROP_P(this_ptr), "_cookies", sizeof("_cookies"), &tmp_cookies, sizeof(zval *), (void **)&cookies);
+ array_init(&tmp_cookies);
+ cookies = zend_hash_str_update(Z_OBJPROP_P(this_ptr), "_cookies", sizeof("_cookies")-1, &tmp_cookies);
}
- ALLOC_INIT_ZVAL(zcookie);
- array_init(zcookie);
- add_index_stringl(zcookie, 0, val, val_len, 1);
- add_assoc_zval_ex(*cookies, name, name_len+1, zcookie);
+ array_init(&zcookie);
+ add_index_stringl(&zcookie, 0, val, val_len);
+ add_assoc_zval_ex(cookies, name, name_len, &zcookie);
}
}
/* }}} */
return;
}
- array_init(return_value);
- if ((cookies = zend_hash_str_find(Z_OBJPROP_P(getThis()), "_cookies", sizeof("_cookies")-1)) != NULL) {
- if (zend_hash_find(Z_OBJPROP_P(this_ptr), "_cookies", sizeof("_cookies"), (void **)&cookies) != FAILURE &&
- Z_TYPE_PP(cookies) == IS_ARRAY) {
- zend_hash_copy(Z_ARRVAL_P(return_value), Z_ARRVAL_P(*cookies), (copy_ctor_func_t) zval_add_ref, (void *)&tmp, sizeof(zval*));
++ if ((cookies = zend_hash_str_find(Z_OBJPROP_P(getThis()), "_cookies", sizeof("_cookies")-1)) != NULL &&
++ Z_TYPE_P(cookies) == IS_ARRAY) {
+ ZVAL_ARR(return_value, zend_array_dup(Z_ARRVAL_P(cookies)));
+ } else {
+ array_init(return_value);
}
}
/* }}} */
}
}
} else {
- if ((zstyle = zend_hash_str_find(Z_OBJPROP_P(this_ptr), "style", sizeof("style")-1)) != NULL) {
- if (zend_hash_find(Z_OBJPROP_P(this_ptr), "style", sizeof("style"), (void **)&zstyle) == SUCCESS &&
- Z_TYPE_PP(zstyle) == IS_LONG) {
- style = Z_LVAL_PP(zstyle);
++ if ((zstyle = zend_hash_str_find(Z_OBJPROP_P(this_ptr), "style", sizeof("style")-1)) != NULL &&
++ Z_TYPE_P(zstyle) == IS_LONG) {
+ style = Z_LVAL_P(zstyle);
} else {
style = SOAP_RPC;
}
method = body;
}
- if (zend_hash_find(Z_OBJPROP_P(this_ptr), "use", sizeof("use"), (void **)&zuse) == SUCCESS &&
- Z_TYPE_PP(zuse) == IS_LONG && Z_LVAL_PP(zuse) == SOAP_LITERAL) {
+ if ((zuse = zend_hash_str_find(Z_OBJPROP_P(this_ptr), "use", sizeof("use")-1)) != NULL &&
- Z_LVAL_P(zuse) == SOAP_LITERAL) {
++ Z_TYPE_P(zuse) == IS_LONG && Z_LVAL_P(zuse) == SOAP_LITERAL) {
use = SOAP_LITERAL;
} else {
use = SOAP_ENCODED;
if (param_val &&
Z_TYPE_P(param_val) == IS_OBJECT &&
Z_OBJCE_P(param_val) == soap_param_class_entry) {
- zval **param_name;
- zval **param_data;
+ zval *param_name;
+ zval *param_data;
- if (zend_hash_find(Z_OBJPROP_P(param_val), "param_name", sizeof("param_name"), (void **)¶m_name) == SUCCESS &&
- Z_TYPE_PP(param_name) == IS_STRING &&
- zend_hash_find(Z_OBJPROP_P(param_val), "param_data", sizeof("param_data"), (void **)¶m_data) == SUCCESS) {
- param_val = *param_data;
- name = Z_STRVAL_PP(param_name);
+ if ((param_name = zend_hash_str_find(Z_OBJPROP_P(param_val), "param_name", sizeof("param_name")-1)) != NULL &&
++ Z_TYPE_P(param_name) == IS_STRING &&
+ (param_data = zend_hash_str_find(Z_OBJPROP_P(param_val), "param_data", sizeof("param_data")-1)) != NULL) {
+ param_val = param_data;
+ name = Z_STRVAL_P(param_name);
}
}