File: bug80220.phpt

package info (click to toggle)
php-imap 3%3A1.0.3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 708 kB
  • sloc: ansic: 3,842; xml: 153; php: 149; pascal: 112; sh: 6; makefile: 3
file content (32 lines) | stat: -rw-r--r-- 531 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
--TEST--
Bug #80220 (imap_mail_compose() may leak memory) - message/rfc822 regression
--EXTENSIONS--
imap
--FILE--
<?php
$bodies = [[
    'type' => TYPEMESSAGE,
    'subtype' => 'RFC822',
], [
    'contents.data' => 'asd',
]];
var_dump(imap_mail_compose([], $bodies));

$bodies = [[
    'type' => TYPEMESSAGE,
], [
    'contents.data' => 'asd',
]];
var_dump(imap_mail_compose([], $bodies));
?>
--EXPECT--
string(53) "MIME-Version: 1.0
Content-Type: MESSAGE/RFC822


"
string(53) "MIME-Version: 1.0
Content-Type: MESSAGE/RFC822


"