[wp-trac] [WordPress Trac] #46813: wp_die() may generate doing_it_wrong notices, confusing other WP error handling
WordPress Trac
noreply at wordpress.org
Sun Apr 14 00:37:10 UTC 2019
#46813: wp_die() may generate doing_it_wrong notices, confusing other WP error
handling
-------------------------------------------------+---------------------
Reporter: ohiosierra | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 5.2
Component: Bootstrap/Load | Version: trunk
Severity: normal | Resolution:
Keywords: servehappy has-patch has-unit-tests | Focuses:
-------------------------------------------------+---------------------
Comment (by tmdesigned):
So we want to stop wp_die() from spawning new error messages, but (if it's
not necessarily going to die) not disable doing_it_wrong outside of that
context?
In that case could we temporarily add that filter silencing
_doing_it_wrong, then remove it?
Back to your first post, I don't see much difference between checking for
the global wp_query in wp_die and then not calling those functions (i.e.
is_feed) versus calling those, which then triggers doing_it_wrong, which
then does the same check. The filter (latter) approach seems a little more
roundabout but also more clean in code.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/46813#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list