Skip to:
Content

bbPress.org

Ticket #2863: 2863.01.patch

File 2863.01.patch, 961 bytes (added by thebrandonallen, 10 years ago)
  • src/includes/common/functions.php

    diff --git src/includes/common/functions.php src/includes/common/functions.php
    index 7101e96..51b8a35 100644
    Login and visit the topic to unsubscribe from these emails.', 'bbpress' ), 
    11751175                $headers[] = 'Bcc: ' . get_userdata( $user_id )->user_email;
    11761176        }
    11771177
     1178        // Make sure someone is receiving an email before sending.
     1179        if ( 1 === count( $headers ) ) {
     1180                return false;
     1181        }
     1182
    11781183        /** Send it ***************************************************************/
    11791184
    11801185        // Custom headers
    Login and visit the topic to unsubscribe from these emails.', 'bbpress' ), 
    13321337                $headers[] = 'Bcc: ' . get_userdata( $user_id )->user_email;
    13331338        }
    13341339
     1340        // Make sure someone is receiving an email before sending.
     1341        if ( 1 === count( $headers ) ) {
     1342                return false;
     1343        }
     1344
    13351345        /** Send it ***************************************************************/
    13361346
    13371347        // Custom headers