[wp-trac] [WordPress Trac] #13480: update_option + PHP5 Object references not storing correctly in cache

WordPress Trac wp-trac at lists.automattic.com
Wed Mar 9 22:49:26 UTC 2011


#13480: update_option + PHP5 Object references not storing correctly in cache
------------------------------+---------------------
 Reporter:  dd32              |       Owner:  ryan
     Type:  defect (bug)      |      Status:  closed
 Priority:  normal            |   Milestone:  3.0
Component:  Cache             |     Version:  3.0
 Severity:  normal            |  Resolution:  fixed
 Keywords:  needs-unit-tests  |
------------------------------+---------------------

Comment (by hakre):

 Another way to comment:

 If you want a NEW value you should offer the clone as such:

 {{{
 $value = clone get_option($option_name);
 $value->var1 = $new_var1;
 update_option($option_name, $value);
 }}}

 my 2 cents. don't fix what isn't broken (so I'll remove the cause.../
 [chuckles] but not the symptom.)

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/13480#comment:6>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list