[wp-trac] [WordPress Trac] #55722: Inconsistent guard conditions in query.php
WordPress Trac
noreply at wordpress.org
Fri May 13 09:48:31 UTC 2022
#55722: Inconsistent guard conditions in query.php
-------------------------+-----------------------------
Reporter: vdankbaar | Owner: vdankbaar
Type: enhancement | Status: assigned
Priority: normal | Milestone: Awaiting Review
Component: Query | Version:
Severity: normal | Keywords:
Focuses: |
-------------------------+-----------------------------
While working on [https://core.trac.wordpress.org/ticket/55104] we noticed
that other functions were also missing guard conditions.
In these cases, $wp_query could be null which would cause a fatal error.
It would be safer to check if $wp_query is set before.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55722>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list