Opened 8 years ago
Closed 8 years ago
#39888 closed defect (bug) (fixed)
Right after delete author - PHP notices on '%s is currently editing'
Reported by: | esemlabel | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 4.8 | Priority: | normal |
Severity: | normal | Version: | 4.7.2 |
Component: | Posts, Post Types | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
After deleting autor, who has just edited some post, the error will occur in the next few minutes in posts list table:
PHP Notice: Trying to get property of non-object in \wp-admin\includes\class-wp-posts-list-table.php on line 910
$locked_text = esc_html( sprintf( __( '%s is currently editing' ), $lock_holder->display_name ) );
Need some fix to immediately remove edit_lock meta with deleted author id from posts.
Attachments (4)
Change History (19)
#2
@
8 years ago
- Keywords needs-patch added
wp_check_post_lock()
could check if the user ID exists and return false otherwise.
@
8 years ago
Since $lock_holder = get_userdata( $lock_holder ); will return false if user id userid not exit.
@
8 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.
#4
@
8 years ago
- Keywords 2nd-opinion reporter-feedback needs-testing added; needs-patch good-first-bug removed
Please have a look on this.
#5
@
8 years ago
- Keywords has-patch added; 2nd-opinion reporter-feedback needs-testing removed
- Milestone changed from Awaiting Review to 4.8
#9
@
8 years ago
@1naveengiri There was no commit yet, which means the ticket is not fixed yet and your patch will be considered for fixing it. So don't worry.
#12
@
8 years ago
wp_check_post_lock()
is used in a few more places, so I still think 39888.1.diff would be the correct fix here.
Maybe need both to remove: _edit_lock and _edit_last or just _edit_last, which contains user ID