Skip to content

Stdlib: mail() array additional_headers + ValueError parity (#21432) - #21436

Merged
PurHur merged 1 commit into
masterfrom
agent/advanced-stdlib-21432-mail-headers-array
Jul 20, 2026
Merged

PurHur merged 1 commit into
masterfrom
agent/advanced-stdlib-21432-mail-headers-array

Conversation

@PurHur

@PurHur PurHur commented Jul 20, 2026

Copy link
Copy Markdown
Owner

Summary

php-src: ext/standard/mail.c (php_mail_build_headers).
PHP: ext/standard/VmMail.php, ext/standard/mail.php.

Closes #21432

Test plan

  • php bin/vm.php test/repro/issue_21432_mail_headers_array.phpOK
  • vendor/bin/phpunit test/compliance/VMTest.php --filter 'mail_headers_array|mail_sendmail_transport|mail_registered' → OK (5)

Made with Cursor

Port php_mail_build_headers() checks so mail() accepts array|string headers and rejects To/Subject, invalid names, and bare CR/LF/NUL like Zend.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stdlib: mail() additional_headers array|string + header ValueError (ext/standard/mail.c)

1 participant