mirror of
https://github.com/php/php-src.git
synced 2024-11-26 03:16:33 +08:00
Adjust previous fix to avoid compiler warnings
This commit is contained in:
parent
9d3030d5f3
commit
5e09a71769
@ -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…
Reference in New Issue
Block a user