[wp-trac] Re: [WordPress Trac] #6332: activate_plugin() and
 deactivate_plugins() bugs (file: / wp-admin/include/plugins.php)
    WordPress Trac 
    wp-trac at lists.automattic.com
       
    Fri Mar 21 11:37:55 GMT 2008
    
    
  
#6332: activate_plugin() and deactivate_plugins() bugs (file: / wp-
admin/include/plugins.php)
-------------------------------+--------------------------------------------
 Reporter:  Denis-de-Bernardy  |        Owner:  anonymous
     Type:  defect             |       Status:  new      
 Priority:  low                |    Milestone:           
Component:  Administration     |      Version:  2.5      
 Severity:  minor              |   Resolution:           
 Keywords:                     |  
-------------------------------+--------------------------------------------
Changes (by Denis-de-Bernardy):
  * summary:  deactivate_plugins() bug (file: / wp-
              admin/include/plugins.php) => activate_plugin()
              and deactivate_plugins() bugs (file: / wp-
              admin/include/plugins.php)
Comment:
 other issue in this area of the WP code. unless I'm mistaking, activating
 a plugin that is already active will generate an error. to fix, replace
 this line in activate_plugin():
 @include(ABSPATH . PLUGINDIR . '/' . $plugin); // error: cannot redeclare
 function/class
 with:
 @include_once(ABSPATH . PLUGINDIR . '/' . $plugin); // no error
 and/or, check if the plugin isn't active already before going through the
 entire procedure.
-- 
Ticket URL: <http://trac.wordpress.org/ticket/6332#comment:1>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
    
    
More information about the wp-trac
mailing list