diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2020-01-06 14:51:14 +0100 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2020-01-06 14:51:14 +0100 |
commit | d7833fd97478bb4224d95a9f7f475551d9b177e2 (patch) | |
tree | 0e5d656191b59087a21b7740bb7a6caac071cedc /ext/standard/tests/mail | |
parent | 29df9d13da7ea56c54c518f3c948f91aaf257c33 (diff) | |
parent | 09ebeba1afdfa6dd6695781e441207cd790f0d42 (diff) | |
download | php-git-d7833fd97478bb4224d95a9f7f475551d9b177e2.tar.gz |
Merge branch 'PHP-7.4'
* PHP-7.4:
Fix #54298: Using empty additional_headers adding extraneous CRLF
Diffstat (limited to 'ext/standard/tests/mail')
-rw-r--r-- | ext/standard/tests/mail/bug54298.phpt | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/ext/standard/tests/mail/bug54298.phpt b/ext/standard/tests/mail/bug54298.phpt new file mode 100644 index 0000000000..a2ab9c83ab --- /dev/null +++ b/ext/standard/tests/mail/bug54298.phpt @@ -0,0 +1,24 @@ +--TEST-- +Bug #54298 (Using empty additional_headers adding extraneous CRLF) +--INI-- +sendmail_path=tee bug54298.eml >/dev/null +mail.add_x_header = Off +--SKIPIF-- +<?php +if (PHP_OS_FAMILY === 'Windows') die("skip Won't run on Windows"); +?> +--FILE-- +<?php +var_dump(mail('someuser@example.com', 'testsubj', 'Body part', '')); +echo file_get_contents('bug54298.eml'); +?> +--EXPECT-- +bool(true) +To: someuser@example.com +Subject: testsubj + +Body part +--CLEAN-- +<?php +unlink('bug54298.eml'); +?> |