WordPress.org

Make WordPress Core

Ticket #39888: 22xx22.2.patch

File 22xx22.2.patch, 704 bytes (added by 1naveengiri, 3 years ago)

Since $lock_holder = get_userdata( $lock_holder ); will return false if user id userid not exit. and the rest functionality will work as expected.

  • wp-admin/includes/class-wp-posts-list-table.php

     
    904904
    905905                if ( $can_edit_post && $post->post_status != 'trash' ) {
    906906                        $lock_holder = wp_check_post_lock( $post->ID );
     907            $lock_holder = get_userdata( $lock_holder );
    907908
    908909                        if ( $lock_holder ) {
    909                                 $lock_holder = get_userdata( $lock_holder );
    910910                                $locked_avatar = get_avatar( $lock_holder->ID, 18 );
    911911                                $locked_text = esc_html( sprintf( __( '%s is currently editing' ), $lock_holder->display_name ) );
    912912                        } else {