forked from php/php-src
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbug80215.phpt
67 lines (67 loc) · 1 KB
/
bug80215.phpt
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
--TEST--
Bug #80215 (imap_mail_compose() may modify by-val parameters)
--EXTENSIONS--
imap
--FILE--
<?php
$envelope = [
"from" => 1,
"to" => 2,
"custom_headers" => [3],
];
$body = [[
"contents.data" => 4,
"type.parameters" => ['foo' => 5],
"disposition" => ['bar' => 6],
], [
"contents.data" => 7,
"type.parameters" => ['foo' => 8],
"disposition" => ['bar' => 9],
]];
imap_mail_compose($envelope, $body);
var_dump($envelope, $body);
?>
--EXPECT--
array(3) {
["from"]=>
int(1)
["to"]=>
int(2)
["custom_headers"]=>
array(1) {
[0]=>
int(3)
}
}
array(2) {
[0]=>
array(3) {
["contents.data"]=>
int(4)
["type.parameters"]=>
array(1) {
["foo"]=>
int(5)
}
["disposition"]=>
array(1) {
["bar"]=>
int(6)
}
}
[1]=>
array(3) {
["contents.data"]=>
int(7)
["type.parameters"]=>
array(1) {
["foo"]=>
int(8)
}
["disposition"]=>
array(1) {
["bar"]=>
int(9)
}
}
}