From 8412ff1f44135695864f5aec0f0b9d54a3443ac9 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Fri, 22 Sep 2017 02:00:33 +0000 Subject: [PATCH] Plugin Editor: Use `include_once` instead of `include` in `plugin_sandbox_scrape()` to fix unit tests broken with [41560]. See #39766. git-svn-id: https://develop.svn.wordpress.org/trunk@41561 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/plugin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-admin/includes/plugin.php b/src/wp-admin/includes/plugin.php index ba6df12a9c..0bc928d742 100644 --- a/src/wp-admin/includes/plugin.php +++ b/src/wp-admin/includes/plugin.php @@ -1909,7 +1909,7 @@ function plugin_sandbox_scrape( $plugin ) { $old_wp_actions = $wp_actions; array_map( 'remove_all_actions', array_keys( $tested_actions ) ); - include( WP_PLUGIN_DIR . '/' . $plugin ); + include_once( WP_PLUGIN_DIR . '/' . $plugin ); // Trigger key actions that are done on the plugin editor to cause the relevant plugin hooks to fire and potentially cause errors. foreach ( $tested_actions as $action => $args ) {