summaryrefslogtreecommitdiff
path: root/ext/imap/tests/bug80242.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/imap/tests/bug80242.phpt')
-rw-r--r--ext/imap/tests/bug80242.phpt22
1 files changed, 22 insertions, 0 deletions
diff --git a/ext/imap/tests/bug80242.phpt b/ext/imap/tests/bug80242.phpt
new file mode 100644
index 0000000000..849e7c6212
--- /dev/null
+++ b/ext/imap/tests/bug80242.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Bug #80242 (imap_mail_compose() segfaults for multipart with rfc822)
+--SKIPIF--
+<?php
+if (!extension_loaded('imap')) die('skip imap extension not available');
+?>
+--FILE--
+<?php
+$bodies = [[
+ 'type' => TYPEMULTIPART,
+], [
+ 'type' => TYPETEXT,
+ 'contents.data' => 'some text',
+], [
+ 'type' => TYPEMESSAGE,
+ 'subtype' => 'RFC822',
+]];
+imap_mail_compose([], $bodies);
+echo "done\n";
+?>
+--EXPECT--
+done