Browse Source
MFH:- Fixed bug #45705 (rfc822_parse_adrlist() modifies passed address parameter)
PECL
MFH:- Fixed bug #45705 (rfc822_parse_adrlist() modifies passed address parameter)
PECL
3 changed files with 95 additions and 14 deletions
@ -0,0 +1,20 @@ |
|||||
|
--TEST-- |
||||
|
Bug #45705 test #1 (imap rfc822_parse_adrlist() modifies passed address parameter) |
||||
|
--SKIPIF-- |
||||
|
<?php |
||||
|
if (!extension_loaded("imap")) { |
||||
|
die("skip imap extension not available"); |
||||
|
} |
||||
|
?> |
||||
|
--FILE-- |
||||
|
<?php |
||||
|
|
||||
|
$address = 'John Doe <john@example.com>'; |
||||
|
var_dump($address); |
||||
|
imap_rfc822_parse_adrlist($address, null); |
||||
|
var_dump($address); |
||||
|
|
||||
|
?> |
||||
|
--EXPECT-- |
||||
|
string(27) "John Doe <john@example.com>" |
||||
|
string(27) "John Doe <john@example.com>" |
||||
@ -0,0 +1,53 @@ |
|||||
|
--TEST-- |
||||
|
Bug #45705 test #2 (imap rfc822_parse_adrlist() modifies passed address parameter) |
||||
|
--SKIPIF-- |
||||
|
<?php |
||||
|
if (!extension_loaded("imap")) { |
||||
|
die("skip imap extension not available"); |
||||
|
} |
||||
|
?> |
||||
|
--FILE-- |
||||
|
<?php |
||||
|
|
||||
|
$envelope = array('return_path' => 'John Doe <john@example.com>', |
||||
|
'from' => 'John Doe <john@example.com>', |
||||
|
'reply_to' => 'John Doe <john@example.com>', |
||||
|
'to' => 'John Doe <john@example.com>', |
||||
|
'cc' => 'John Doe <john@example.com>', |
||||
|
'bcc' => 'John Doe <john@example.com>', |
||||
|
); |
||||
|
|
||||
|
var_dump($envelope); |
||||
|
imap_mail_compose($envelope, array(1 => array())); |
||||
|
var_dump($envelope); |
||||
|
|
||||
|
?> |
||||
|
--EXPECT-- |
||||
|
array(6) { |
||||
|
["return_path"]=> |
||||
|
string(27) "John Doe <john@example.com>" |
||||
|
["from"]=> |
||||
|
string(27) "John Doe <john@example.com>" |
||||
|
["reply_to"]=> |
||||
|
string(27) "John Doe <john@example.com>" |
||||
|
["to"]=> |
||||
|
string(27) "John Doe <john@example.com>" |
||||
|
["cc"]=> |
||||
|
string(27) "John Doe <john@example.com>" |
||||
|
["bcc"]=> |
||||
|
string(27) "John Doe <john@example.com>" |
||||
|
} |
||||
|
array(6) { |
||||
|
["return_path"]=> |
||||
|
string(27) "John Doe <john@example.com>" |
||||
|
["from"]=> |
||||
|
string(27) "John Doe <john@example.com>" |
||||
|
["reply_to"]=> |
||||
|
string(27) "John Doe <john@example.com>" |
||||
|
["to"]=> |
||||
|
string(27) "John Doe <john@example.com>" |
||||
|
["cc"]=> |
||||
|
string(27) "John Doe <john@example.com>" |
||||
|
["bcc"]=> |
||||
|
string(27) "John Doe <john@example.com>" |
||||
|
} |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue