[wp-trac] [WordPress Trac] #38374: Null check needed for call to get_post_type_object() in get_post_type_archive_template()
WordPress Trac
noreply at wordpress.org
Mon Jan 30 19:31:27 UTC 2017
#38374: Null check needed for call to get_post_type_object() in
get_post_type_archive_template()
-------------------------------+---------------------------
Reporter: technopolitica | Owner: boonebgorges
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 4.8
Component: Posts, Post Types | Version: 4.6.1
Severity: normal | Resolution: fixed
Keywords: has-patch | Focuses:
-------------------------------+---------------------------
Changes (by boonebgorges):
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"40031"]:
{{{
#!CommitTicketReference repository="" revision="40031"
Avoid PHP notices in `get_post_type_archive_template()`.
The function should fail more gracefully when called in the context
where `get_query_var( 'post_type' )` doesn't represent an actual post
type.
Props technopolitica, dlh.
Fixes #38374.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38374#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list