[wp-trac] [WordPress Trac] #4429: add_option followed by
update_option not always working
WordPress Trac
wp-trac at lists.automattic.com
Mon Jun 11 18:10:11 GMT 2007
#4429: add_option followed by update_option not always working
-----------------------------+----------------------------------------------
Reporter: YellowSwordfish | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone:
Component: Administration | Version: 2.2
Severity: normal | Keywords: add_option update_option
-----------------------------+----------------------------------------------
I have an update script that brings a plugin from any version up to the
current version. Early on there is an add_option request. Later I need to
add to the content so I perform a get_option, modify the content and
perform an update_option. This also happens a second time in the script.
Results can vary. For some the sequence works fine. For others the final
option content may only contain the final two 'update' calls having lost
the original.
In tests I have just performed I ended up with two option rows (with the
same option_name) - the first with the original content, the second with
the two modifications combined.
I do not believe this ever happened (to my knowledge) prior to 2.2 but
seems to be quite common on 2.2.
It's almost as if the subsequent calls are not pulling the original option
from the cache.
--
Ticket URL: <http://trac.wordpress.org/ticket/4429>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list