summaryrefslogtreecommitdiff
path: root/ext/imap/tests/bug80216.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/imap/tests/bug80216.phpt')
-rw-r--r--ext/imap/tests/bug80216.phpt17
1 files changed, 17 insertions, 0 deletions
diff --git a/ext/imap/tests/bug80216.phpt b/ext/imap/tests/bug80216.phpt
new file mode 100644
index 0000000000..ccaf1e1e39
--- /dev/null
+++ b/ext/imap/tests/bug80216.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Bug #80216 (imap_mail_compose() does not validate types/encodings)
+--SKIPIF--
+<?php
+if (!extension_loaded('imap')) die('skip imap extension not available');
+?>
+--FILE--
+<?php
+imap_mail_compose([], [['type' => TYPEMULTIPART], []]);
+imap_mail_compose([], [['type' => 12]]);
+imap_mail_compose([], [['type' => TYPEMULTIPART], ['type' => 12]]);
+imap_mail_compose([], [['encoding' => 8]]);
+imap_mail_compose([], [['type' => TYPEMULTIPART], ['encoding' => 8]]);
+echo "done\n";
+?>
+--EXPECT--
+done