default:
#endif
case 80:
+ case 0:
url->scheme = estrndup("http", lenof("http"));
break;
return FAILURE;
}
} else {
- zval val = zval_used_for_init;
- ZVAL_ZVAL(&val, *data, 1, 0);
- convert_to_string(&val);
+ zval *val = http_zsep(IS_STRING, *data);
if (PHPSTR_LEN(str)) {
phpstr_append(str, arg_sep, arg_sep_len);
phpstr_append(str, PHPSTR_VAL(&new_prefix), PHPSTR_LEN(&new_prefix));
phpstr_appends(str, "=");
- if (Z_STRLEN(val) && Z_STRVAL(val)) {
+ if (Z_STRLEN_P(val) && Z_STRVAL_P(val)) {
char *encoded_val;
int encoded_len;
- encoded_val = php_url_encode(Z_STRVAL(val), Z_STRLEN(val), &encoded_len);
+ encoded_val = php_url_encode(Z_STRVAL_P(val), Z_STRLEN_P(val), &encoded_len);
phpstr_append(str, encoded_val, encoded_len);
efree(encoded_val);
}
- zval_dtor(&val);
+ zval_ptr_dtor(&val);
}
phpstr_dtor(&new_prefix);
}