diff options
| author | Ilia Alshanetsky <iliaa@php.net> | 2009-03-07 21:56:52 +0000 |
|---|---|---|
| committer | Ilia Alshanetsky <iliaa@php.net> | 2009-03-07 21:56:52 +0000 |
| commit | eb6f6181a71cc2519227e70f20b449348e2d330b (patch) | |
| tree | f0f88ac1216fe064c2b6f3fd0e3d00409ddaf7e9 /sapi/apache_hooks | |
| parent | 12138a09f5a9df54a4ce2c54044924dad4607efa (diff) | |
| download | php-git-eb6f6181a71cc2519227e70f20b449348e2d330b.tar.gz | |
MFB: Improved parameter handling
Diffstat (limited to 'sapi/apache_hooks')
| -rw-r--r-- | sapi/apache_hooks/php_apache.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/sapi/apache_hooks/php_apache.c b/sapi/apache_hooks/php_apache.c index b46528aeae..52bd180570 100644 --- a/sapi/apache_hooks/php_apache.c +++ b/sapi/apache_hooks/php_apache.c @@ -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); |
