Making WordPress.org

Changeset 10299


Ignore:
Timestamp:
09/29/2020 02:46:16 AM (6 years ago)
Author:
dd32
Message:

Support Forums: Avoid a PHP Notice when the post can't be found - which seemed to be half-expected in this function.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-hooks.php

    r10248 r10299  
    198198                        case 'edit_reply':
    199199                                $post = get_post( $args[0] );
     200                                if ( ! $post ) {
     201                                        break;
     202                                }
    200203
    201204                                // Reviews can be edited at any time.
    … …  
    205208
    206209                                if (
    207                                         $post && bbp_past_edit_lock( $post->post_date_gmt )
     210                                        bbp_past_edit_lock( $post->post_date_gmt )
    208211                                &&
    209212                                        ! user_can( $user_id, 'moderate', $post->ID )
Note: See TracChangeset for help on using the changeset viewer.