Making WordPress.org

Changeset 12680


Ignore:
Timestamp:
06/29/2023 03:01:52 AM (16 months ago)
Author:
dd32
Message:

Plugin Directory: Don't log an unassigned change if the post doesn't have a reviewer currently assigned.

See #6993.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/metabox/class-reviewer.php

    r12594 r12680  
    139139    public static function set_reviewer( $post, $reviewer, $log_it = true ) {
    140140        $post             = get_post( $post );
    141         $current_reviewer = get_post_meta( $post->ID, 'assigned_reviewer', true );
     141        $current_reviewer = (int) get_post_meta( $post->ID, 'assigned_reviewer', true );
    142142        $reviewer         = is_object( $reviewer ) ? $reviewer : get_user_by( 'id', $reviewer );
    143143        $reviewer_id      = $reviewer->ID ?? 0;
Note: See TracChangeset for help on using the changeset viewer.