xref: /PHP-8.0/ext/imap/tests/bug80242.phpt (revision 315b95b0)
1--TEST--
2Bug #80242 (imap_mail_compose() segfaults for multipart with rfc822)
3--SKIPIF--
4<?php
5if (!extension_loaded('imap')) die('skip imap extension not available');
6?>
7--FILE--
8<?php
9$bodies = [[
10    'type' => TYPEMULTIPART,
11], [
12    'type' => TYPETEXT,
13    'contents.data' => 'some text',
14], [
15    'type' => TYPEMESSAGE,
16    'subtype' => 'RFC822',
17]];
18imap_mail_compose([], $bodies);
19echo "done\n";
20?>
21--EXPECT--
22done
23