From f6042ffc5b71c754b7f25e0ea0e934c05944c0b1 Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Mon, 28 Dec 2020 01:43:18 +0000 Subject: [PATCH] Site Health: Check that WordPress is installed before scheduling the HTTPS cron. Trying to schedule cron jobs before WordPress is installed results in DB errors, which is suboptimal. See #47577. git-svn-id: https://develop.svn.wordpress.org/trunk@49909 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/https-detection.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/wp-includes/https-detection.php b/src/wp-includes/https-detection.php index 895b3a8516..87c331bf24 100644 --- a/src/wp-includes/https-detection.php +++ b/src/wp-includes/https-detection.php @@ -119,6 +119,10 @@ function wp_update_https_detection_errors() { * @access private */ function wp_schedule_https_detection() { + if ( wp_installing() ) { + return; + } + if ( ! wp_next_scheduled( 'wp_https_detection' ) ) { wp_schedule_event( time(), 'twicedaily', 'wp_https_detection' ); }