mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-07 09:49:04 +00:00
Fix checking for whether WP_User object is actually a user. props filosofo, fixes #13903 for trunk.
git-svn-id: https://develop.svn.wordpress.org/trunk@15404 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1112,7 +1112,7 @@ function author_can( $post, $capability ) {
|
||||
|
||||
$author = new WP_User( $post->post_author );
|
||||
|
||||
if ( empty( $author ) )
|
||||
if ( empty( $author->ID ) )
|
||||
return false;
|
||||
|
||||
$args = array_slice( func_get_args(), 2 );
|
||||
|
||||
Reference in New Issue
Block a user