From 2d1fff2c75676db85588e62e4effc25b9cae1fa3 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Tue, 6 Oct 2015 14:20:25 +0000 Subject: [PATCH] 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 --- wp-admin/setup-config.php | 3 ++- wp-includes/version.php | 2 +- wp-load.php | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/wp-admin/setup-config.php b/wp-admin/setup-config.php index 1c464727c6..c24dfbee89 100644 --- a/wp-admin/setup-config.php +++ b/wp-admin/setup-config.php @@ -53,8 +53,9 @@ if ( file_exists( ABSPATH . 'wp-config.php' ) ) wp_die( '

' . 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 installing now." ), 'install.php' ) . '

' ); // 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( '

' . 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 installing now."), 'install.php' ) . '

' ); +} $step = isset( $_GET['step'] ) ? (int) $_GET['step'] : -1; diff --git a/wp-includes/version.php b/wp-includes/version.php index de20e1e8d9..a2bfd38a9d 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @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. diff --git a/wp-load.php b/wp-load.php index 983298bb68..a20fc0ac57 100644 --- a/wp-load.php +++ b/wp-load.php @@ -36,10 +36,10 @@ if ( file_exists( ABSPATH . 'wp-config.php') ) { /** The config file resides in ABSPATH */ 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 */ - require_once( dirname(ABSPATH) . '/wp-config.php' ); + require_once( dirname( ABSPATH ) . '/wp-config.php' ); } else {