Skip to content

Commit

Permalink
Check that $_SERVER['SERVER_NAME'] is exists before use correctly.
Browse files Browse the repository at this point in the history
  • Loading branch information
mantis committed Aug 11, 2014
1 parent d9d784f commit e7b23e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config_defaults_inc.php
Expand Up @@ -4105,9 +4105,9 @@

# Add developers defaults when server is localhost
# Note: intentionally not using SERVER_ADDR as it's not guaranteed to exist
if( isset( $_SERVER['SERVER_NAME'] ) && strcasecmp( $_SERVER['SERVER_NAME'], 'localhost' ) == 0
if( isset( $_SERVER['SERVER_NAME'] ) && ( strcasecmp( $_SERVER['SERVER_NAME'], 'localhost' ) == 0
|| $_SERVER['SERVER_NAME'] == '127.0.0.1'
) {
) ) {
$g_display_errors[E_WARNING] = DISPLAY_ERROR_HALT;
$g_display_errors[E_ALL] = DISPLAY_ERROR_INLINE;
}
Expand Down

0 comments on commit e7b23e6

Please sign in to comment.