From 1ad7538792d96b4ef0971b37f96fd7e9f0c1853d Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 25 Apr 2021 13:21:05 +0000 Subject: [PATCH] Plugins: When loading a plugin in a "sandbox" on activation, do it once. This avoids a fatal error if the plugin is already included, e.g. in unit tests. Follow-up to [50787]. See #31104. Built from https://develop.svn.wordpress.org/trunk@50788 git-svn-id: http://core.svn.wordpress.org/trunk@50397 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/plugin.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/plugin.php b/wp-admin/includes/plugin.php index 487df7f4f6..3a4b488127 100644 --- a/wp-admin/includes/plugin.php +++ b/wp-admin/includes/plugin.php @@ -2292,7 +2292,7 @@ function plugin_sandbox_scrape( $plugin ) { } wp_register_plugin_realpath( WP_PLUGIN_DIR . '/' . $plugin ); - include WP_PLUGIN_DIR . '/' . $plugin; + include_once WP_PLUGIN_DIR . '/' . $plugin; } /** diff --git a/wp-includes/version.php b/wp-includes/version.php index d6a6466b9d..4bf39dbb7a 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.8-alpha-50787'; +$wp_version = '5.8-alpha-50788'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.