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

WordPress Trac noreply at wordpress.org
Mon Jan 21 04:26:38 UTC 2019


#44956: Prevent `update_network_option()` from updating when the old and new values
contain identical objects.
--------------------------------------+----------------------------
 Reporter:  peterwilsoncc             |       Owner:  peterwilsoncc
     Type:  defect (bug)              |      Status:  closed
 Priority:  normal                    |   Milestone:  5.1
Component:  Networks and Sites        |     Version:
 Severity:  normal                    |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+----------------------------
Changes (by peterwilsoncc):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"44662" 44662]:
 {{{
 #!CommitTicketReference repository="" revision="44662"
 Options: Avoid unnecessary DB calls when updating network options.

 Adds a `maybe_serialize()` comparison for the old and new values in
 `update_network_option()` to avoid unnecessary database writes when
 options contain identical objects.

 Props bor0.
 Fixes #44956.
 }}}

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


More information about the wp-trac mailing list