[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 4 21:54:22 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  |     Focuses:
-----------------------------+------------------
Changes (by iaaxpage):

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


Comment:

 @peterwilsoncc I just pulled the patch and ran the option unit tests and
 they passed.

 `phpunit tests/phpunit/tests/option/option.php `

 The method **test_the_basics** asserts this to false if the value is the
 same.

 ` $this->assertFalse( update_option( $key, $value ) );  // Value is the
 same `

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


More information about the wp-trac mailing list