[wp-trac] [WordPress Trac] #50850: When the deactivate_plugins() function is called in the ABSPATH/wp-admin/includes/plugin.php file, the is_plugin_active_for_network() conditional tag always returns true when the active_sitewide_plugins sitemeta option is set to 1

WordPress Trac noreply at wordpress.org
Thu Aug 6 16:22:57 UTC 2020


#50850: When the deactivate_plugins() function is called in the ABSPATH/wp-
admin/includes/plugin.php file, the is_plugin_active_for_network()
conditional tag always returns true when the active_sitewide_plugins
sitemeta option is set to 1
--------------------------+------------------------------
 Reporter:  zenithcity    |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Plugins       |     Version:  5.4.2
 Severity:  critical      |  Resolution:
 Keywords:  needs-patch   |     Focuses:  multisite
--------------------------+------------------------------

Comment (by zenithcity):

 Hi Sergey

 > I could not reproduce a path in core where active_sitewide_plugins would
 be set to 1. It's only updated > in activate_plugin()​ and
 deactivate_plugins()​, with both instances receiving an array.

 Yes, the instance where **1** is being displayed as the value to the
 **active_sitewide_plugins** column was a clear cut surprise to me. Even if
 errors should occur that should not be happening. The source plugin I was
 testing with, I deliberately created and triggered the error during the
 plugin activation process to see what happens thereafter.

 I created the ticket because the test plugin just triggers errors, no
 instance of updating/adding any value anywhere, and the other plugins I
 have installed are Hello and Akismet, both not activated.

 Currently, after modifying the plugin and updating the
 'active_sitewide_plugins' option to an empty serialized array string, even
 the errors, I cannot reproduce the instance where 1 is set to as the
 value.

 This is strange and unusual. Interesting!

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/50850#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list