bug45705_2.phpt 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. --TEST--
  2. Bug #45705 test #2 (imap rfc822_parse_adrlist() modifies passed address parameter)
  3. --EXTENSIONS--
  4. imap
  5. --FILE--
  6. <?php
  7. $envelope = array('return_path' => 'John Doe <john@example.com>',
  8. 'from' => 'John Doe <john@example.com>',
  9. 'reply_to' => 'John Doe <john@example.com>',
  10. 'to' => 'John Doe <john@example.com>',
  11. 'cc' => 'John Doe <john@example.com>',
  12. 'bcc' => 'John Doe <john@example.com>',
  13. );
  14. var_dump($envelope);
  15. imap_mail_compose($envelope, [1 => ['cc' => 'Steve Doe <steve@example.com>',]]);
  16. var_dump($envelope);
  17. ?>
  18. --EXPECT--
  19. array(6) {
  20. ["return_path"]=>
  21. string(27) "John Doe <john@example.com>"
  22. ["from"]=>
  23. string(27) "John Doe <john@example.com>"
  24. ["reply_to"]=>
  25. string(27) "John Doe <john@example.com>"
  26. ["to"]=>
  27. string(27) "John Doe <john@example.com>"
  28. ["cc"]=>
  29. string(27) "John Doe <john@example.com>"
  30. ["bcc"]=>
  31. string(27) "John Doe <john@example.com>"
  32. }
  33. array(6) {
  34. ["return_path"]=>
  35. string(27) "John Doe <john@example.com>"
  36. ["from"]=>
  37. string(27) "John Doe <john@example.com>"
  38. ["reply_to"]=>
  39. string(27) "John Doe <john@example.com>"
  40. ["to"]=>
  41. string(27) "John Doe <john@example.com>"
  42. ["cc"]=>
  43. string(27) "John Doe <john@example.com>"
  44. ["bcc"]=>
  45. string(27) "John Doe <john@example.com>"
  46. }