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.

git-svn-id: https://develop.svn.wordpress.org/trunk@47478 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2020-03-21 15:42:57 +00:00
parent 7c15916c28
commit f44d456a4b

View File

@ -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 <a href="%2$s">installing now</a>.' ),
'<code>wp-config.php</code>',
'install.php'
) . '</p>'
) . '</p>',
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 <a href="%2$s">installing now</a>.' ),
'<code>wp-config.php</code>',
'install.php'
) . '</p>'
) . '</p>',
409
);
}