[wp-trac] [WordPress Trac] #39010: REST API: Treat null and other falsy values like `false` in 'rest_allow_anonymous_comments'
WordPress Trac
noreply at wordpress.org
Mon Dec 12 01:39:15 UTC 2016
#39010: REST API: Treat null and other falsy values like `false` in
'rest_allow_anonymous_comments'
-------------------------------------------------+-------------------------
Reporter: jnylen0 | Owner: jnylen0
Type: enhancement | Status: closed
Priority: normal | Milestone: 4.7.1
Component: REST API | Version: 4.7
Severity: normal | Resolution: fixed
Keywords: has-patch has-unit-tests commit | Focuses:
fixed-major |
-------------------------------------------------+-------------------------
Changes (by dd32):
* status: reopened => closed
* resolution: => fixed
Comment:
In [changeset:"39566"]:
{{{
#!CommitTicketReference repository="" revision="39566"
REST API: Treat any falsy value as `false` in
'rest_allow_anonymous_comments'.
Extend the check in 'rest_allow_anonymous_comments' to accept any falsy
value (previously this was an explicit check for `false`).
One possible failure case is that a plugin developer forgets to include a
return value for some code path in their callback for this filter, leading
to a value of null which is currently treated like `true`.
Props joehoyle, jnylen0.
Merges [39487] to the 4.7 branch.
Fixes #39010.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39010#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list