[wp-trac] [WordPress Trac] #38301: update_network_option not accepting null for network_id
WordPress Trac
noreply at wordpress.org
Wed Mar 27 16:06:31 UTC 2019
#38301: update_network_option not accepting null for network_id
--------------------------------+------------------------
Reporter: aliakro | Owner: (none)
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Options, Meta APIs | Version: 4.4
Severity: normal | Resolution: invalid
Keywords: | Focuses: multisite
--------------------------------+------------------------
Changes (by desrosj):
* status: new => closed
* focuses: => multisite
* component: General => Options, Meta APIs
* version: 4.6.1 => 4.4
* milestone: Awaiting Review =>
* resolution: => invalid
Comment:
Hi @aliakro,
Thanks for opening this ticket, and welcome to Trac! Sorry that it took so
long to receive a response.
I did some testing to confirm. But, the code in `update_network_option()`
will work as expected if `null` is passed. `if ( null )` is evaluated as
`false`. Therefor the first `if()` statement in that code block will not
evaluate as `true` when `null` is passed.
I am going to close this out, but if you are able to trigger incorrect
behavior by passing `null`, please reopen and provide some more details.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38301#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list