From a21f5a3cc054137f3ace4760db43845158fb3cc2 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 28 Nov 2023 20:22:26 +0000 Subject: [PATCH 1/3] Site Health: Remove unused `$wpdb` global in `utf8mb4` support test. Follow-up to [44984], [56475]. Props upadalavipul, mukesh27. Fixes #59977. git-svn-id: https://develop.svn.wordpress.org/trunk@57141 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/class-wp-site-health.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/wp-admin/includes/class-wp-site-health.php b/src/wp-admin/includes/class-wp-site-health.php index 39b4d0ad56880..da6c81e985219 100644 --- a/src/wp-admin/includes/class-wp-site-health.php +++ b/src/wp-admin/includes/class-wp-site-health.php @@ -1288,13 +1288,9 @@ public function get_test_sql_server() { * * @since 5.2.0 * - * @global wpdb $wpdb WordPress database abstraction object. - * * @return array The test results. */ public function get_test_utf8mb4_support() { - global $wpdb; - if ( ! $this->mysql_server_version ) { $this->prepare_sql_data(); } From 96339bda237182d2d1246b8b4f12df9833643cd9 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 29 Nov 2023 09:32:58 +0000 Subject: [PATCH 2/3] Login and Registration: Use correct variable to display a single error message. When the `wp_login_errors` filter is used to add an error message followed by an instructional message, the former was not displayed and the latter was errouneously displayed twice above the login form. This commit ensures that the error message is displayed as expected. Follow-up to [56654]. Props mapumba. Fixes #59983. git-svn-id: https://develop.svn.wordpress.org/trunk@57142 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-login.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/wp-login.php b/src/wp-login.php index 2ed484a780262..0641cd52e6a40 100644 --- a/src/wp-login.php +++ b/src/wp-login.php @@ -257,7 +257,7 @@ function login_header( $title = 'Log In', $message = '', $wp_error = null ) { $errors .= ''; } else { - $errors .= '

' . $error_message . '

'; + $errors .= '

' . $error_list[0] . '

'; } /** @@ -265,9 +265,10 @@ function login_header( $title = 'Log In', $message = '', $wp_error = null ) { * * @since 2.1.0 * - * @param string $errors Login error message. + * @param string $errors Login error messages. */ $errors = apply_filters( 'login_errors', $errors ); + wp_admin_notice( $errors, array( @@ -287,6 +288,7 @@ function login_header( $title = 'Log In', $message = '', $wp_error = null ) { * @param string $messages Login messages. */ $messages = apply_filters( 'login_messages', $messages ); + wp_admin_notice( $messages, array( From fdec26724691d64c58e4cfe17557ec5ef00bc0bd Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Wed, 29 Nov 2023 11:52:36 +0000 Subject: [PATCH 3/3] Test: Run database upgrades between performance test steps. Prevents pending upgrades from blocking tests when checking out previous builds. Props mukesh27. See #59647. git-svn-id: https://develop.svn.wordpress.org/trunk@57143 602fd350-edb4-49c9-b593-d223f7449a82 --- .github/workflows/performance.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/performance.yml b/.github/workflows/performance.yml index ce7767e57d8fa..a4a18431136d1 100644 --- a/.github/workflows/performance.yml +++ b/.github/workflows/performance.yml @@ -73,11 +73,13 @@ jobs: # - Check out target commit (target branch or previous commit). # - Install npm dependencies. # - Build WordPress. + # - Run any database upgrades. # - Run performance tests (previous/target commit). # - Print target performance tests results. # - Reset to original commit. # - Install npm dependencies. # - Set the environment to the baseline version. + # - Run any database upgrades. # - Run baseline performance tests. # - Print baseline performance tests results. # - Compare results with base. @@ -194,6 +196,9 @@ jobs: - name: Build WordPress run: npm run build + - name: Run any database upgrades + run: npm run env:cli -- core update-db --path=/var/www/${{ env.LOCAL_DIR }} + - name: Run target performance tests (base/previous commit) env: TEST_RESULTS_PREFIX: before @@ -215,6 +220,9 @@ jobs: npm run env:cli -- core update --version=${{ env.BASE_TAG }} --force --path=/var/www/${{ env.LOCAL_DIR }} npm run env:cli -- core version --path=/var/www/${{ env.LOCAL_DIR }} + - name: Run any database upgrades + run: npm run env:cli -- core update-db --path=/var/www/${{ env.LOCAL_DIR }} + - name: Run baseline performance tests env: TEST_RESULTS_PREFIX: base