Making WordPress.org


Ignore:
Timestamp:
02/16/2022 05:57:57 AM (3 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.

File:
1 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.
Note: See TracChangeset for help on using the changeset viewer.