Editor: In edit-form-blocks.php
, check the result of wp_set_post_lock()
, which may return false
and cause a warning when passed to implode()
.
Props kakshak, aduth. Fixes #47013. git-svn-id: https://develop.svn.wordpress.org/trunk@45413 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
a6fa4b5491
commit
8081adfefa
@ -247,9 +247,13 @@ if ( $user_id ) {
|
||||
} else {
|
||||
// Lock the post.
|
||||
$active_post_lock = wp_set_post_lock( $post->ID );
|
||||
$lock_details = array(
|
||||
if ( $active_post_lock ) {
|
||||
$active_post_lock = esc_attr( implode( ':', $active_post_lock ) );
|
||||
}
|
||||
|
||||
$lock_details = array(
|
||||
'isLocked' => false,
|
||||
'activePostLock' => esc_attr( implode( ':', $active_post_lock ) ),
|
||||
'activePostLock' => $active_post_lock,
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user