|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #66535 X-PHP-Originating-Script adds newline if no custom headers are given
Submitted: 2014-01-21 17:16 UTC Modified: 2014-02-28 14:46 UTC
From: Assigned: datibbaw (profile)
Status: Closed Package: *Mail Related
PHP Version: 5.5.8 OS: N/A
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
44 - 38 = ?
Subscribe to this entry?

 [2014-01-21 17:16 UTC]
A newline is added to the mail headers when mail.add_x_header is used and no other headers are passed to mail().

The scenario in which custom headers are used was already fixed in #48620, back in 2009; this is different.

Test script:
assert(ini_get('mail.add_x_header') == 1);
mail("", "Test", "A line of text.");

Expected result:
From: me@mymachine.local (Me)
X-PHP-Originating-Script: 501:-

A line of text.

Actual result:
From: me@mymachine.local (Me)
X-PHP-Originating-Script: 501:-

A line of text.


Add a Patch

Pull Requests

Pull requests:

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2014-02-28 14:46 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: datibbaw
 [2014-02-28 14:46 UTC]
The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at

 For Windows:
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sun Jan 26 02:01:23 2020 UTC