From 5e35ad4b4a7468543eaba7e4aed6562836ddf453 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 30 Nov 2021 17:12:01 +0000 Subject: [PATCH] Upgrade/Install: Check that WordPress is installed before scheduling cleanup of the `temp-backup` directory. Trying to schedule cron jobs before WordPress is installed results in DB errors, which is suboptimal. This addresses a `Table 'wp_options' doesn't exist` error when running the installation with `WP_DEBUG` enabled. Follow-up to [51815], [51898], [51899], [51902], [52192]. Props dlh, pbiron. See #51857. Built from https://develop.svn.wordpress.org/trunk@52284 git-svn-id: http://core.svn.wordpress.org/trunk@51876 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-upgrader.php | 5 ++++- wp-includes/version.php | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/class-wp-upgrader.php b/wp-admin/includes/class-wp-upgrader.php index 6e525219b8..9487dc6cd4 100644 --- a/wp-admin/includes/class-wp-upgrader.php +++ b/wp-admin/includes/class-wp-upgrader.php @@ -141,7 +141,10 @@ class WP_Upgrader { public function init() { $this->skin->set_upgrader( $this ); $this->generic_strings(); - $this->schedule_temp_backup_cleanup(); + + if ( ! wp_installing() ) { + $this->schedule_temp_backup_cleanup(); + } } /** diff --git a/wp-includes/version.php b/wp-includes/version.php index 65bbc56161..c31290443c 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '5.9-alpha-52283'; +$wp_version = '5.9-alpha-52284'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.