[wp-trac] [WordPress Trac] #35379: update_network_option changes stored option value if sanitize_option detects error
WordPress Trac
noreply at wordpress.org
Thu Apr 14 16:10:49 UTC 2016
#35379: update_network_option changes stored option value if sanitize_option
detects error
-------------------------------------------------+-------------------------
Reporter: thomaswm | Owner: jeremyfelt
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: Future
Component: Options, Meta APIs | Release
Severity: normal | Version: 3.0
Keywords: has-patch has-unit-tests dev- | Resolution:
feedback needs-testing | Focuses: multisite
-------------------------------------------------+-------------------------
Comment (by codex-m):
Thanks @flixos90 / @jeremyfelt for the update. I merged the final patch
from this ticket #35698. Attached is the final patch (35379.3.diff) which
is now a combination of the two patches. Basically it now illustrates the
concept of adding `$context` which will have a value of 'network' for
multisite implementation. And also the `$context_id` which will have the
value of network ID when used with multisite. As suggested, I illustrated
$context_id instead of $network_id for a more flexible implementation.
I re-tested this manuall and also using our automated testing. Works
great. This also fixes the original issue being reported in this ticket.
The unit test to cover these changes is 35379_unit_test.2.diff (previously
attached).
Let me know what you think :)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35379#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list