Skip to:
Content

BuddyPress.org

Changeset 10504


Ignore:
Timestamp:
02/03/2016 11:35:18 PM (7 years ago)
Author:
djpaul
Message:

Emails: preserve multiple "to" addresses in the backwards compatibility code.

See #6592

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/deprecated/2.5.php

    r10501 r10504  
    7373    }
    7474
     75    $original_value = $value;
     76
    7577    if ( $property === 'to' ) {
    76         $value          = array_shift( $value );
     78        $value          = array_shift( $original_value );
    7779        $recipient_name = $value->get_name();     // Value - name
    7880        $value          = $value->get_address();  // Key   - email
     
    646648    if ( $property === 'to' ) {
    647649        // We always break apart $to, so we always need to rebuild it.
    648         $value = array( new BP_Email_Recipient( $value, $recipient_name ) );
     650        array_unshift( $original_value, new BP_Email_Recipient( $value, $recipient_name ) );
     651        $value = $original_value;
    649652    }
    650653
Note: See TracChangeset for help on using the changeset viewer.