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