From 248a115c2b994bb0f70accce7a337066cc04f3cc Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 21 Mar 2020 15:44:15 +0000 Subject: [PATCH] Upgrade/Install: Return a more appropriate HTTP response status code (`409 Conflict`) if the `wp-config.php` file already exists. Props linyows, ocean90. Fixes #42466. Built from https://develop.svn.wordpress.org/trunk@47478 git-svn-id: http://core.svn.wordpress.org/trunk@47267 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/setup-config.php | 6 ++++-- wp-includes/version.php | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/wp-admin/setup-config.php b/wp-admin/setup-config.php index 4ae670dd2f..f88e629f01 100644 --- a/wp-admin/setup-config.php +++ b/wp-admin/setup-config.php @@ -63,7 +63,8 @@ if ( file_exists( ABSPATH . 'wp-config.php' ) ) { __( 'The file %1$s already exists. If you need to reset any of the configuration items in this file, please delete it first. You may try installing now.' ), 'wp-config.php', 'install.php' - ) . '

' + ) . '

', + 409 ); } @@ -75,7 +76,8 @@ if ( @file_exists( ABSPATH . '../wp-config.php' ) && ! @file_exists( ABSPATH . ' __( 'The file %1$s 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.' ), 'wp-config.php', 'install.php' - ) . '

' + ) . '

', + 409 ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index 62cbc66d48..5778fa5a44 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.5-alpha-47476'; +$wp_version = '5.5-alpha-47478'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.