summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoao Ventura2009-10-03 16:52:09 (GMT)
committer Joao Ventura2009-10-03 16:52:09 (GMT)
commit80e61ded7ae68f0c037b24881463c706eeeb68a8 (patch)
treea313fd72bbd12b4bef6da2e81ca53ad5a182bc41
parent753bb4b0b67a5847c71bf187421b9edba4222e9a (diff)
Fix #582360: don't complain about missing e-mail addresses when there's a blank line at the end
-rw-r--r--print_mail/print_mail.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/print_mail/print_mail.inc b/print_mail/print_mail.inc
index f00838f..9617f9f 100644
--- a/print_mail/print_mail.inc
+++ b/print_mail/print_mail.inc
@@ -179,7 +179,7 @@ function print_mail_form_validate($form, &$form_state) {
}
// All new-lines are replaced by commas
- $to_addrs = preg_replace('![\r|\n|,]+!', ',', $form_state['values']['txt_to_addrs']);
+ $to_addrs = preg_replace('![\r|\n|,]+!', ',', trim($form_state['values']['txt_to_addrs']));
// Create an array from the string
$to_array = explode(',', $to_addrs);
// Verify each element of the array