update_option + PHP5 Object references not storing correctly in cache
|Reported by:||dd32||Owned by:||ryan|
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 .
The solution is to clone the variables if they're objects in the Options API.