Set Newline Bug |
|||
|---|---|---|---|
| Date: | 05/03/2007 | Severity: | Trivial |
| Status: | Resolved | Reporter: | mstclaire |
| Version: | 1.5.3 | ||
| Keywords: | Libraries, Email Class | ||
Description
In core library Email, line 487 does not allow override of “\n” character because of OR conditions. These or conditions should be && (AND) conditions. See block below from line 487 - 493.
Code Sample
if ($newline != "\n" OR $newline != "\r\n" OR $newline != "\r")
{
$this->newline = "\n";
return;
}
$this->newline = $newline;
Expected Result
$this->newline = “\r\n” if set_newline(”\r\n\”)
Actual Result
$this->newline = “\n” if set_newline(”\r\n\”)
Comment on Bug Report
| Posted by: Geert De Deckere on 4 May 2007 10:34am | |
|
|
Bug approved by me. Alternative fix:
if (!in_array($newline, array("\r", "\r\n"))Note that you can leave “\n” out of the array. One option less to check for. |
