From f53188ffff123eb74dfdc024462d831cdf36195f Mon Sep 17 00:00:00 2001 From: Jb Audras Date: Tue, 27 Sep 2022 10:35:08 +0000 Subject: [PATCH] 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 --- src/wp-admin/install.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-admin/install.php b/src/wp-admin/install.php index 1c59835bfb..3edc3230cd 100644 --- a/src/wp-admin/install.php +++ b/src/wp-admin/install.php @@ -96,7 +96,7 @@ function display_setup_form( $error = null ) { // Ensure that sites appear in search engines by default. $blog_public = 1; if ( isset( $_POST['weblog_title'] ) ) { - $blog_public = isset( $_POST['blog_public'] ); + $blog_public = isset( $_POST['blog_public'] ) ? (int) $_POST['blog_public'] : $blog_public; } $weblog_title = isset( $_POST['weblog_title'] ) ? trim( wp_unslash( $_POST['weblog_title'] ) ) : '';