[wp-trac] [WordPress Trac] #13480: update_option + PHP5 Object references not storing correctly in cache
WordPress Trac
wp-trac at lists.automattic.com
Fri May 21 14:15:26 UTC 2010
#13480: update_option + PHP5 Object references not storing correctly in cache
--------------------------+-------------------------------------------------
Reporter: dd32 | Owner: ryan
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.0
Component: Cache | Version: 3.0
Severity: normal | Keywords:
--------------------------+-------------------------------------------------
This is related to the changes to caching of the options API.
At present, When objects are saved using the option API, the PHP5 object
references are being stored in an array in the "object cache", The result
is that if you attempt to update an object variable multiple times in 1
page load, you'll end up with only the first update_option succeeding.
This is because on subsequent calls, the object cache references the NEW
value as existing within the database..
Whilst this ticket description might be hard to follow, This is the same
as [9740].
The solution is to clone the variables if they're objects in the Options
API.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/13480>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list