WordPress.org

Make WordPress Core

Changeset 34867


Ignore:
Timestamp:
10/06/2015 02:19:17 PM (6 years ago)
Author:
wonderboymusic
Message:

Setup/Config: some dirname( ABSPATH ) file lookups should have errors suppressed due to possibility of open_basedir restrictions on hosts.

Props chriscct7, misterunknown.
Fixes #29680.

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/setup-config.php

    r33734 r34867  
    5454
    5555// Check if wp-config.php exists above the root directory but is not part of another install
    56 if ( file_exists(ABSPATH . '../wp-config.php' ) && ! file_exists( ABSPATH . '../wp-settings.php' ) )
     56if ( @file_exists( ABSPATH . '../wp-config.php' ) && ! @file_exists( ABSPATH . '../wp-settings.php' ) ) {
    5757    wp_die( '<p>' . sprintf( __( "The file 'wp-config.php' already exists one level above your WordPress installation. If you need to reset any of the configuration items in this file, please delete it first. You may try <a href='install.php'>installing now</a>."), 'install.php' ) . '</p>' );
     58}
    5859
    5960$step = isset( $_GET['step'] ) ? (int) $_GET['step'] : -1;
  • trunk/src/wp-load.php

    r32116 r34867  
    3737    require_once( ABSPATH . 'wp-config.php' );
    3838
    39 } elseif ( file_exists( dirname(ABSPATH) . '/wp-config.php' ) && ! file_exists( dirname(ABSPATH) . '/wp-settings.php' ) ) {
     39} elseif ( @file_exists( dirname( ABSPATH ) . '/wp-config.php' ) && ! @file_exists( dirname( ABSPATH ) . '/wp-settings.php' ) ) {
    4040
    4141    /** The config file resides one level above ABSPATH but is not part of another install */
    42     require_once( dirname(ABSPATH) . '/wp-config.php' );
     42    require_once( dirname( ABSPATH ) . '/wp-config.php' );
    4343
    4444} else {
Note: See TracChangeset for help on using the changeset viewer.