bug45705_2.phpt 1.4 KB

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