[wp-trac] [WordPress Trac] #12930: Unserialize error?
WordPress Trac
noreply at wordpress.org
Thu Feb 21 11:26:58 UTC 2013
#12930: Unserialize error?
----------------------------------------------+-----------------------
Reporter: ipstenu | Owner:
Type: defect (bug) | Status: reopened
Priority: high | Milestone: 3.0
Component: General | Version: 3.5.1
Severity: major | Resolution:
Keywords: 3.0-beta unserialize needs-patch |
----------------------------------------------+-----------------------
Changes (by hexalys):
* cc: themacmaster@… (added)
* keywords: 3.0-beta, unserialize => 3.0-beta unserialize needs-patch
* status: closed => reopened
* resolution: fixed =>
* version: => 3.5.1
Comment:
Nacin, r13673 may have addressed those plugin error at the time, but you
introduced a new cache defect.
In update_option() where your changed to $alloptions[$option] =
$_newvalue; and wp_cache_set( $option, $_newvalue, 'options' );
$_newvalue should be kept $newvalue when it come to the cache, to remain
consistent with the way add_option() works.
Right now add_option() store options as serialized while update_option()
stores them as arrays which is very inconsistent.
It really messes things up, especially with a memory cache, where you
suddenly may get unexpected arrays instead of serialized values,but can't
really know for sure what you will get.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/12930#comment:16>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list