mirror of
https://github.com/php/php-src.git
synced 2024-11-25 19:05:31 +08:00
Added a sanity check (hopefuly will fix bug #20109). According to
http://developer.netscape.com/docs/manuals/enterprise/40/nsapi/05_nsapi.htm#551539 util_hostname() can return a NULL value.
This commit is contained in:
parent
65b79b3595
commit
d5870ef544
@ -318,7 +318,9 @@ sapi_nsapi_register_server_variables(zval *track_vars_array TSRMLS_DC)
|
||||
}
|
||||
sprintf(buf, "%d", conf_getglobals()->Vport);
|
||||
php_register_variable("SERVER_PORT", buf, track_vars_array TSRMLS_CC );
|
||||
php_register_variable("SERVER_NAME", util_hostname(), track_vars_array TSRMLS_CC );
|
||||
if ((value = util_hostname())) {
|
||||
php_register_variable("SERVER_NAME", value, track_vars_array TSRMLS_CC );
|
||||
}
|
||||
php_register_variable("SERVER_URL", http_uri2url("", ""), track_vars_array TSRMLS_CC );
|
||||
php_register_variable("HTTPS", (security_active ? "ON" : "OFF"), track_vars_array TSRMLS_CC );
|
||||
/* php_register_variable("SERVER_SOFTWARE", MAGNUS_VERSION_STRING, track_vars_array TSRMLS_CC ); */
|
||||
|
Loading…
Reference in New Issue
Block a user