From: Pierre Joye Date: Mon, 16 Mar 2009 10:08:51 +0000 (+0000) Subject: - revert last commit (tree was not updated) X-Git-Tag: php-5.3.0RC1~77 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3612ddde1630f944c4d1328f717d3da1869048f3;p=php - revert last commit (tree was not updated) --- diff --git a/sapi/apache_hooks/php_apache.c b/sapi/apache_hooks/php_apache.c index 67d6aef295..e6b61bb9b9 100644 --- a/sapi/apache_hooks/php_apache.c +++ b/sapi/apache_hooks/php_apache.c @@ -713,23 +713,21 @@ PHP_FUNCTION(apache_request_server_port) PHP_FUNCTION(apache_request_remote_host) { zval *id; - long ztype; + 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 (ZEND_NUM_ARGS() == 1) { - 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);