WordPress.org

Make WordPress Core

Changeset 21129


Ignore:
Timestamp:
06/26/12 03:55:40 (22 months ago)
Author:
nacin
Message:

Do not pass mail() a fourth argument when safe_mode is in effect.

Fixes the sending of mail when in safe_mode. There is a bug report being addressed upstream with PHPMailer.

props sumindmitriy. see #20970 for 3.4.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.4/wp-includes/class-phpmailer.php

    r20715 r21129  
    761761      if ($this->SingleTo === true && count($toArr) > 1) { 
    762762        foreach ($toArr as $key => $val) { 
    763           $rt = @mail($val, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header, $params); 
     763          $rt = @mail($val, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header); 
    764764          // implement call back function if it exists 
    765765          $isSent = ($rt == 1) ? 1 : 0; 
     
    767767        } 
    768768      } else { 
    769         $rt = @mail($to, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header, $params); 
     769        $rt = @mail($to, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header); 
    770770        // implement call back function if it exists 
    771771        $isSent = ($rt == 1) ? 1 : 0; 
Note: See TracChangeset for help on using the changeset viewer.