[wp-trac] [WordPress Trac] #20719: update_site_option can't handle saving objects
WordPress Trac
wp-trac at lists.automattic.com
Mon May 21 13:12:17 UTC 2012
#20719: update_site_option can't handle saving objects
--------------------------+-----------------------------
Reporter: griffinjt | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Multisite | Version: 3.4
Severity: normal | Keywords:
--------------------------+-----------------------------
When using the `update_option` function, if an object is passed as the
value, the function automatically clones and serializes (if necessary) the
value before saving, and then `get_option` unserializes (if necessary)
when retrieving the data.
`update_site_option` does not do this, so it cannot handle saving objects
unless you add a workaround using the pre_update_site_option_* filter or
just check for serializing when saving and retrieving the data. One would
expect for `update_site_option` to be able to handle objects, too.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/20719>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list