Browse Source

MFB: Adjust previous fix to avoid compiler warnings

experimental/first_unicode_implementation
Ilia Alshanetsky 18 years ago
parent
commit
dbe0873150
  1. 11
      sapi/apache_hooks/php_apache.c

11
sapi/apache_hooks/php_apache.c

@ -713,22 +713,21 @@ PHP_FUNCTION(apache_request_server_port)
PHP_FUNCTION(apache_request_remote_host)
{
zval *id;
long ztype = NULL;
long type = 0;
request_rec *r;
char *res;
int type = REMOTE_NAME;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &ztype) == FAILURE) {
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &type) == FAILURE) {
return;
}
if (ztype) {
type = ztype;
if (!type) {
type = REMOTE_NAME
}
APREQ_GET_REQUEST(id, r);
res = (char *)ap_get_remote_host(r->connection, r->per_dir_config, type);
res = (char *)ap_get_remote_host(r->connection, r->per_dir_config, (int)type);
if (res) {
RETURN_STRING(res, 1);

Loading…
Cancel
Save