Making WordPress.org

Changeset 11563


Ignore:
Timestamp:
02/16/2022 05:57:57 AM (2 years ago)
Author:
dd32
Message:

Support Forums: Fix a logic order reversal in [11562] (Didn't affect email notifications), avoid some PHP Notices.

See #5505.

Location:
sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc
Files:
2 edited

Legend:

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

    r11562 r11563  
    5858        }
    5959
     60        $no_reply    = apply_filters( 'bbp_subscription_to_email', bbp_get_do_not_reply_address() );
     61        $dest_emails = is_array( $attrs['to'] ) ? $attrs['to'] : explode( ',', $attrs['to'] );
     62
    6063        // Pull out CC's and BCC's to a separate array.
    6164        foreach ( $attrs['headers'] as $i => $header ) {
     
    7376        }
    7477
    75         $no_reply    = apply_filters( 'bbp_subscription_to_email', bbp_get_do_not_reply_address() );
    76         $dest_emails = is_array( $attrs['to'] ) ? $attrs['to'] : explode( ',', $attrs['to'] );
    7778        // Remove the noreply email, it was probably set as the $to address.
    7879        $dest_emails = array_diff( $dest_emails, [ $no_reply ] );
    79    
     80
    8081        // This shouldn't happen, but if it does, let wp_mail() do it's thing instead.
    8182        // NOTE: We still process if there was only one to/cc/bcc address, to ensure the below custom filter gets run.
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-plugin-directory-compat.php

    r10819 r11563  
    4343
    4444    function title() {
    45         return $this->plugin->post_title;
     45        return $this->plugin->post_title ?? '';
    4646    }
    4747
    4848    function status() {
    49         return $this->plugin->post_status;
     49        return $this->plugin->post_status ?? '';
    5050    }
    5151
Note: See TracChangeset for help on using the changeset viewer.