[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
Thu Dec 8 02:08:39 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:
-----------------------------+------------------
Comment (by peterwilsoncc):
Replying to [comment:2 salcode]:
> Test written at #wcus 2016 contributor day
Thanks for the tests @salcode.
Rather than using the hook to detect if the function exists early, a more
direct test would be to test `get_num_queries()` returns the same value
before and after the function call. It will save a bit of messing around.
Testing the returned value is false would also be ideal.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38903#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list