Make WordPress Core

Changeset 45413


Ignore:
Timestamp:
05/25/2019 02:34:30 PM (5 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/edit-form-blocks.php

    r44938 r45413  
    248248    // Lock the post.
    249249    $active_post_lock = wp_set_post_lock( $post->ID );
    250     $lock_details     = array(
     250    if ( $active_post_lock ) {
     251        $active_post_lock = esc_attr( implode( ':', $active_post_lock ) );
     252    }
     253
     254    $lock_details = array(
    251255        'isLocked'       => false,
    252         'activePostLock' => esc_attr( implode( ':', $active_post_lock ) ),
     256        'activePostLock' => $active_post_lock,
    253257    );
    254258}
Note: See TracChangeset for help on using the changeset viewer.