mirror of
https://github.com/php/php-src.git
synced 2024-11-26 03:16:33 +08:00
Improved parameter handling
This commit is contained in:
parent
483d9636e9
commit
9d3030d5f3
@ -713,7 +713,7 @@ PHP_FUNCTION(apache_request_server_port)
|
||||
PHP_FUNCTION(apache_request_remote_host)
|
||||
{
|
||||
zval *id;
|
||||
long ztype;
|
||||
long ztype = NULL;
|
||||
request_rec *r;
|
||||
char *res;
|
||||
int type = REMOTE_NAME;
|
||||
@ -722,15 +722,10 @@ PHP_FUNCTION(apache_request_remote_host)
|
||||
return;
|
||||
}
|
||||
|
||||
switch (ZEND_NUM_ARGS()) {
|
||||
case 0:
|
||||
break;
|
||||
case 1:
|
||||
type = ztype;
|
||||
break;
|
||||
if (ztype) {
|
||||
type = ztype;
|
||||
}
|
||||
|
||||
|
||||
APREQ_GET_REQUEST(id, r);
|
||||
|
||||
res = (char *)ap_get_remote_host(r->connection, r->per_dir_config, type);
|
||||
|
Loading…
Reference in New Issue
Block a user