[wpmu-trac] [WordPress MU Trac] #1071: update_site_option() fails when updating with an empty array or zero length string

WordPress MU Trac wpmu-trac at lists.automattic.com
Wed Jul 22 18:06:15 UTC 2009


#1071: update_site_option() fails when updating with an empty array or zero length
string
------------------------+---------------------------------------------------
 Reporter:  apeatling   |       Owner:  somebody
     Type:  defect      |      Status:  new     
 Priority:  highest     |   Milestone:  2.8     
Component:  component1  |     Version:          
 Severity:  blocker     |    Keywords:          
------------------------+---------------------------------------------------
 This is causing site-wide plugin activation to fail.

 Try this as a test:

 var_dump( update_option( 'test', '' ) ); // returns true
 var_dump( update_site_option( 'test', '' ) ); // returns false

 var_dump( update_option( 'test', array() ) ); // returns true
 var_dump( update_site_option( 'test', array() ) ); // returns false

 var_dump( update_option( 'test', false ) ); // returns false
 var_dump( update_site_option( 'test', false ) ); // returns false

 So when the last site wide activated plugin is deactivated, the
 update_site_option tries to save an empty array of plugins, causing it to
 fail. This did not happen prior to 2.8.1 as far as I can tell.

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


More information about the wpmu-trac mailing list