[wp-trac] [WordPress Trac] #59360: update_network_option() strict checks can cause false negatives
WordPress Trac
noreply at wordpress.org
Tue Oct 10 09:35:24 UTC 2023
#59360: update_network_option() strict checks can cause false negatives
---------------------------------------------+---------------------------
Reporter: mukesh27 | Owner: spacedmonkey
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 6.4
Component: Options, Meta APIs | Version:
Severity: normal | Resolution: fixed
Keywords: has-unit-tests has-patch commit | Focuses: performance
---------------------------------------------+---------------------------
Changes (by spacedmonkey):
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"56814" 56814]:
{{{
#!CommitTicketReference repository="" revision="56814"
Options, Meta APIs: Prevent unnecessary database updates caused by strict
comparisons in update_network_option.
Previously, in the update_network_option function, strict comparisons
between old and new values could erroneously trigger updates in cases
where there was no actual change in values. Building upon the groundwork
laid in #22192, this commit introduces the use of the
_is_equal_database_value function to accurately compare values before
initiating any database updates. This change ensures consistency between
the behaviors of `update_option` and `update_network_option`.
Furthermore, we have incorporated similar workarounds that were previously
implemented in [56717]. These changes ensure that the raw version of
network option values is considered in the comparisons, enhancing the
overall reliability of the update process.
Props mukesh27, flixos90, joemcgill, costdev, spacedmonkey.
Fixes #59360.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59360#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list