Skip to content

Commit f53188f

Browse files
committed
Upgrade/Install: Keep search engine checkbox value when reloading the Install screen.
This changeset ensures the value of the search engine checkbox is not reset to its default value when a faulty form is sent in the Install screen. Props ramon-fincken, audrasjb, whaze, rafiahmedd, khokansardar, costdev, ankit-k-gupta. Fixes #55900. git-svn-id: https://develop.svn.wordpress.org/trunk@54326 602fd350-edb4-49c9-b593-d223f7449a82
1 parent d19ad47 commit f53188f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wp-admin/install.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ function display_setup_form( $error = null ) {
9696
// Ensure that sites appear in search engines by default.
9797
$blog_public = 1;
9898
if ( isset( $_POST['weblog_title'] ) ) {
99-
$blog_public = isset( $_POST['blog_public'] );
99+
$blog_public = isset( $_POST['blog_public'] ) ? (int) $_POST['blog_public'] : $blog_public;
100100
}
101101

102102
$weblog_title = isset( $_POST['weblog_title'] ) ? trim( wp_unslash( $_POST['weblog_title'] ) ) : '';

0 commit comments

Comments
 (0)