Make WordPress Core

Ticket #35069: 35069-2.diff

File 35069-2.diff, 673 bytes (added by jtsternberg, 9 years ago)
  • src/wp-includes/pluggable.php

     
    237237
    238238        /**
    239239         * Filter the wp_mail() arguments.
     240         * Expects a return array. If an array is not returned, we'll bail here
     241         * and assume that wp_mail has been short-circuited.
    240242         *
    241243         * @since 2.2.0
    242244         *
     
    245247         */
    246248        $atts = apply_filters( 'wp_mail', compact( 'to', 'subject', 'message', 'headers', 'attachments' ) );
    247249
     250        if ( ! is_array( $atts ) ) {
     251           return $atts;
     252        }
     253
    248254        if ( isset( $atts['to'] ) ) {
    249255                $to = $atts['to'];
    250256        }