[wp-trac] [WordPress Trac] #36901: Removing wp_die() from wp_allow_comment()
WordPress Trac
noreply at wordpress.org
Wed Sep 28 21:37:44 UTC 2016
#36901: Removing wp_die() from wp_allow_comment()
-------------------------------------------------+-------------------------
Reporter: websupporter | Owner:
Type: enhancement | rachelbaker
Priority: normal | Status: assigned
Component: Comments | Milestone: 4.7
Severity: normal | Version: 4.6
Keywords: has-patch needs-testing has-unit- | Resolution:
tests | Focuses:
-------------------------------------------------+-------------------------
Comment (by rachelbaker):
@websupporter Thank you for your work on this ticket. The meaning of
`$return_error` seems to get muddy in a few places and is often used as a
parameter in functions (like in `check_comment_flood_db()`) where they
aren't expected to return a `WP_Error` at all. What do you think about
using a parameter that signals executions of `wp_die` should be avoided
instead? Maybe `$avoid_die`? This would allow us to still return
`WP_Error` objects up the function chain while avoiding mis-leading
variables. Thoughts?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36901#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list