1--TEST--
2mb_send_mail() with null bytes in arguments
3--FILE--
4<?php
5
6try {
7    mb_send_mail("foo\0bar", "x", "y");
8} catch (ValueError $e) {
9    echo $e->getMessage(), "\n";
10}
11try {
12    mb_send_mail("x", "foo\0bar", "y");
13} catch (ValueError $e) {
14    echo $e->getMessage(), "\n";
15}
16try {
17    mb_send_mail("x", "y", "foo\0bar");
18} catch (ValueError $e) {
19    echo $e->getMessage(), "\n";
20}
21try {
22    mb_send_mail("x", "y", "z", "foo\0bar");
23} catch (ValueError $e) {
24    echo $e->getMessage(), "\n";
25}
26try {
27    mb_send_mail("x", "y", "z", "q", "foo\0bar");
28} catch (ValueError $e) {
29    echo $e->getMessage(), "\n";
30}
31
32?>
33--EXPECT--
34mb_send_mail(): Argument #1 ($to) must not contain any null bytes
35mb_send_mail(): Argument #2 ($subject) must not contain any null bytes
36mb_send_mail(): Argument #3 ($message) must not contain any null bytes
37mb_send_mail(): Argument #4 ($additional_headers) must not contain any null bytes
38mb_send_mail(): Argument #5 ($additional_params) must not contain any null bytes
39