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.

Built from https://develop.svn.wordpress.org/trunk@34867


git-svn-id: http://core.svn.wordpress.org/trunk@34832 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2015-10-06 14:20:25 +00:00
parent ddbd67a22e
commit 2d1fff2c75
3 changed files with 5 additions and 4 deletions

View File

@ -53,8 +53,9 @@ if ( file_exists( ABSPATH . 'wp-config.php' ) )
wp_die( '<p>' . sprintf( __( "The file 'wp-config.php' already exists. If you need to reset any of the configuration items in this file, please delete it first. You may try <a href='%s'>installing now</a>." ), 'install.php' ) . '</p>' ); wp_die( '<p>' . sprintf( __( "The file 'wp-config.php' already exists. If you need to reset any of the configuration items in this file, please delete it first. You may try <a href='%s'>installing now</a>." ), 'install.php' ) . '</p>' );
// Check if wp-config.php exists above the root directory but is not part of another install // Check if wp-config.php exists above the root directory but is not part of another install
if ( file_exists(ABSPATH . '../wp-config.php' ) && ! file_exists( ABSPATH . '../wp-settings.php' ) ) if ( @file_exists( ABSPATH . '../wp-config.php' ) && ! @file_exists( ABSPATH . '../wp-settings.php' ) ) {
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>' ); 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>' );
}
$step = isset( $_GET['step'] ) ? (int) $_GET['step'] : -1; $step = isset( $_GET['step'] ) ? (int) $_GET['step'] : -1;

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.4-alpha-34866'; $wp_version = '4.4-alpha-34867';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

View File

@ -36,10 +36,10 @@ if ( file_exists( ABSPATH . 'wp-config.php') ) {
/** The config file resides in ABSPATH */ /** The config file resides in ABSPATH */
require_once( ABSPATH . 'wp-config.php' ); require_once( ABSPATH . 'wp-config.php' );
} elseif ( file_exists( dirname(ABSPATH) . '/wp-config.php' ) && ! file_exists( dirname(ABSPATH) . '/wp-settings.php' ) ) { } elseif ( @file_exists( dirname( ABSPATH ) . '/wp-config.php' ) && ! @file_exists( dirname( ABSPATH ) . '/wp-settings.php' ) ) {
/** The config file resides one level above ABSPATH but is not part of another install */ /** The config file resides one level above ABSPATH but is not part of another install */
require_once( dirname(ABSPATH) . '/wp-config.php' ); require_once( dirname( ABSPATH ) . '/wp-config.php' );
} else { } else {