[wp-trac] [WordPress Trac] #39725: Post Type Capabilities Broken
WordPress Trac
noreply at wordpress.org
Wed Apr 19 20:43:13 UTC 2017
#39725: Post Type Capabilities Broken
-------------------------------+---------------------------------
Reporter: michael.ecklund | Owner:
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: Awaiting Review
Component: Posts, Post Types | Version: 4.7.2
Severity: normal | Resolution:
Keywords: | Focuses: ui, administration
-------------------------------+---------------------------------
Comment (by michael.ecklund):
I'm not a core developer, so I'm unaware of the impact of this change.
However, the following change does eliminate the PHP Notices.
`./wp-includes/capabilities.php` Line: 56
'''Change From:'''
`$post = get_post( $args[0] );`
'''Change To:'''
{{{#!php
if ( isset( $args[0] ) ) {
$post = get_post( $args[0] );
} else {
$post = null;
}
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39725#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list