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.
Built from https://develop.svn.wordpress.org/trunk@45413


git-svn-id: http://core.svn.wordpress.org/trunk@45224 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2019-05-25 14:35:52 +00:00
parent 35a2322d32
commit 693e90ac81
2 changed files with 7 additions and 3 deletions

View File

@ -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,
);
}

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.3-alpha-45412';
$wp_version = '5.3-alpha-45413';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.