Making WordPress.org


Ignore:
Timestamp:
04/17/2024 06:28:35 AM (5 months ago)
Author:
dd32
Message:

Support Forums: Be more specific when using ?? as otherwise PHP does the comparison before applying the null check.

File:
1 edited

Legend:

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

    r13548 r13549  
    283283            } elseif ( bbp_is_topic_edit() ) {
    284284                $content = get_post_field( 'post_content', bbp_get_topic_id() );
    285             } elseif ( 'bbp-edit-reply' === $_POST['action'] ?? '' ) {
     285            } elseif ( 'bbp-edit-reply' === ( $_POST['action'] ?? '' ) ) {
    286286                $content = wp_unslash( $_POST['bbp_reply_content'] ?? '' ) ?: bbp_get_reply( $_POST['bbp_reply_id'] ?? 0 )->post_content;
    287             } elseif ( 'bbp-edit-topic' === $_POST['action'] ?? '' ) {
     287            } elseif ( 'bbp-edit-topic' === ( $_POST['action'] ?? '' ) ) {
    288288                $content = wp_unslash( $_POST['bbp_topic_content'] ?? '' ) ?: get_post_field( 'post_content', $_POST['bbp_topic_id'] );
    289289            }
Note: See TracChangeset for help on using the changeset viewer.