xref: /PHP-8.0/ext/imap/tests/bug80213.phpt (revision 5aaffc80)
1--TEST--
2Bug #80213 (imap_mail_compose() segfaults on certain $bodies)
3--SKIPIF--
4<?php
5if (!extension_loaded('imap')) die('skip imap extension not available');
6?>
7--FILE--
8<?php
9$envelope = [];
10$body = [[
11    'type.parameters' => ['param'],
12    'disposition' => ['disp'],
13], [
14    'type.parameters' => ['param'],
15    'disposition' => ['disp'],
16]];
17var_dump(imap_mail_compose($envelope, $body));
18echo "done\n";
19?>
20--EXPECT--
21string(67) "MIME-Version: 1.0
22Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
23
24
25"
26done
27