mirror of
https://github.com/php/php-src.git
synced 2024-09-23 02:47:26 +00:00
7485978339
This is an automated migration of most SKIPIF extension_loaded checks.
27 lines
663 B
PHP
27 lines
663 B
PHP
--TEST--
|
|
Bug #80223 (imap_mail_compose() leaks envelope on malformed bodies)
|
|
--EXTENSIONS--
|
|
imap
|
|
--FILE--
|
|
<?php
|
|
try {
|
|
imap_mail_compose([], []);
|
|
} catch (\ValueError $e) {
|
|
echo $e->getMessage(), \PHP_EOL;
|
|
}
|
|
try {
|
|
imap_mail_compose([], [1]);
|
|
} catch (\TypeError $e) {
|
|
echo $e->getMessage(), \PHP_EOL;
|
|
}
|
|
try {
|
|
imap_mail_compose([], [[]]);
|
|
} catch (\ValueError $e) {
|
|
echo $e->getMessage(), \PHP_EOL;
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
imap_mail_compose(): Argument #2 ($bodies) cannot be empty
|
|
imap_mail_compose(): Argument #2 ($bodies) individual body must be of type array, int given
|
|
imap_mail_compose(): Argument #2 ($bodies) individual body cannot be empty
|