[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
Sun Dec 11 21:42:14 UTC 2016
#38903: Prevent `update_option()` from updating when the old and new values contain
identical objects.
--------------------------------------------+----------------------------
Reporter: peterwilsoncc | Owner: peterwilsoncc
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 4.8
Component: Options, Meta APIs | Version: 2.0
Severity: normal | Resolution: fixed
Keywords: early has-patch has-unit-tests | Focuses:
--------------------------------------------+----------------------------
Changes (by peterwilsoncc):
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"39564"]:
{{{
#!CommitTicketReference repository="" revision="39564"
Options: Prevent unnecessary SQL updates by `update_option`.
Previously an option containing an object would trigger an SQL `UPDATE` on
all calls to `update_option`, even if the old and new values were
identical. This was due to the old and new values having differing
resource IDs.
This change compares the old and new values as serialized data to remove
the resource ID from the comparison.
Props salcode, bradyvercher, peterwilsoncc.
Fixes #38903.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38903#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list