Changeset 14782
- Timestamp:
- 05/21/2010 03:15:32 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/capabilities.php
r14585 r14782 836 836 837 837 // If the user is the author... 838 if ( $user_id == $post_author_data->ID ) {838 if ( is_object( $post_author_data ) && $user_id == $post_author_data->ID ) { 839 839 // If the post is published... 840 840 if ( 'publish' == $post->post_status ) { … … 872 872 } 873 873 874 if ( $user_id == $page_author_data->ID ) {874 if ( is_object( $page_author_data ) && $user_id == $page_author_data->ID ) { 875 875 // If the page is published... 876 876 if ( $page->post_status == 'publish' ) { … … 907 907 //echo "current user id : $user_id, post author id: " . $post_author_data->ID . "<br />"; 908 908 // If the user is the author... 909 if ( $user_id == $post_author_data->ID ) {909 if ( is_object( $post_author_data ) && $user_id == $post_author_data->ID ) { 910 910 // If the post is published... 911 911 if ( 'publish' == $post->post_status ) { … … 935 935 //echo "current user id : $user_id, page author id: " . $page_author_data->ID . "<br />"; 936 936 // If the user is the author... 937 if ( $user_id == $page_author_data->ID ) {937 if ( is_object( $page_author_data ) && $user_id == $page_author_data->ID ) { 938 938 // If the page is published... 939 939 if ( 'publish' == $page->post_status ) { … … 971 971 $author_data = get_userdata( $user_id ); 972 972 $post_author_data = get_userdata( $post->post_author ); 973 if ( $user_id == $post_author_data->ID )973 if ( is_object( $post_author_data ) && $user_id == $post_author_data->ID ) 974 974 $caps[] = 'read'; 975 975 else … … 986 986 $author_data = get_userdata( $user_id ); 987 987 $page_author_data = get_userdata( $page->post_author ); 988 if ( $user_id == $page_author_data->ID )988 if ( is_object( $page_author_data ) && $user_id == $page_author_data->ID ) 989 989 $caps[] = 'read'; 990 990 else
Note: See TracChangeset
for help on using the changeset viewer.