[wp-trac] [WordPress Trac] #55104: is_main_query() fatal error on null
WordPress Trac
noreply at wordpress.org
Sat May 14 16:21:28 UTC 2022
#55104: is_main_query() fatal error on null
--------------------------------------+-----------------------------
Reporter: nhadsall | Owner: SergeyBiryukov
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 6.1
Component: Query | Version:
Severity: major | Resolution:
Keywords: good-first-bug has-patch | Focuses:
--------------------------------------+-----------------------------
Changes (by nacin):
* status: closed => reopened
* resolution: fixed =>
Comment:
This failing hard with a fatal error seems like a benefit, and is
something I originally anticipated. It's not something we could have
introduced after the fact for many of the 2.x `is_*` functions, but
because `is_main_query` was introduced much later (3.3), we could get away
with doing so. You'd only get a fatal if you call this too early in
WordPress load. Given this function has existed in this manner for ~11
years without incident, I'd consider reversion.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55104#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list