1
0
mirror of https://github.com/php/php-src.git synced 2026-04-29 11:13:36 +02:00
Files
archived-php-src/ext/standard/tests/mail/bug54298.phpt
T
Christoph M. Becker ae2150692a Fix #54298: Using empty additional_headers adding extraneous CRLF
If the header string is empty, we pass `NULL` to `php_mail()` to avoid
further checks on the string length.
2020-01-06 14:47:23 +01:00

25 lines
483 B
PHP

--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');
?>