[wpmu-trac] [WordPress MU Trac] #967: Uninstall Hook Broken

WordPress MU Trac wpmu-trac at lists.automattic.com
Mon Apr 27 07:01:09 GMT 2009


#967: Uninstall Hook Broken
---------------------+------------------------------------------------------
 Reporter:  hakre    |       Owner:  somebody
     Type:  defect   |      Status:  new     
 Priority:  normal   |   Milestone:          
Component:  General  |     Version:  2.7.1   
 Severity:  normal   |    Keywords:          
---------------------+------------------------------------------------------
 Uninstall does not work with Callbacks:

 When a Plugin registers an uninstall hook (using API call
 register_uninstall_hook()) with an instance of a class, deleting a
 deactivated plugin will fail later on.

 When the deletion process is triggered (uninstall_plugin($plugin)),
 get_option('uninstall_plugins') will return callback values. I assume that
 because the plugin isn't included any longer because of being deactivated,
 get_option returns (automatically de-serialzed) objects of type
 '''__PHP_Incomplete_Class''' instead of '''aConcretePluginClass'''.
 Therefore the uninstall callback fails then.

 A first workaround suggestion is to use the uninstall.php file instead of
 an uninstall hook.

-- 
Ticket URL: <http://trac.mu.wordpress.org/ticket/967>
WordPress MU Trac <http://mu.wordpress.org/>
WordPress Multiuser


More information about the wpmu-trac mailing list