[wp-trac] [WordPress Trac] #38903: Prevent `update_option()` from updating when the old and new values contain identical objects.

WordPress Trac noreply at wordpress.org
Tue Nov 22 12:22:52 UTC 2016


#38903: Prevent `update_option()` from updating when the old and new values contain
identical objects.
----------------------------------------------+------------------
 Reporter:  peterwilsoncc                     |       Owner:
     Type:  defect (bug)                      |      Status:  new
 Priority:  normal                            |   Milestone:  4.8
Component:  General                           |     Version:  2.0
 Severity:  normal                            |  Resolution:
 Keywords:  early has-patch needs-unit-tests  |     Focuses:
----------------------------------------------+------------------
Changes (by peterwilsoncc):

 * keywords:  early => early has-patch needs-unit-tests


Comment:

 In [attachment:38903.diff]:

 * run the old and new values through `maybe_serialize()` before comparing.

 Bringing this over from a patch in #38866.

 I'm not sure of the perfromance implication of serialising in this manner,
 on the surface it's doesn't seem great, so some data would be helpful
 here.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/38903#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list