diff options
| author | fukachan <fukachan> | 2001-05-18 14:59:21 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2001-05-18 14:59:21 +0000 |
| commit | eab01e014d8787cecfa58495189de5405d2dd838 (patch) | |
| tree | 1fbb30b41590b8a498a87fd726ed7b9dc0405054 | |
| parent | 1d6fc2c835cf3bbfdc5c0db01a83b0ccf1921a8f (diff) | |
| download | fml8-eab01e014d8787cecfa58495189de5405d2dd838.tar.gz fml8-eab01e014d8787cecfa58495189de5405d2dd838.tar.bz2 fml8-eab01e014d8787cecfa58495189de5405d2dd838.zip | |
check type of arguments: recipient, recipients
| -rw-r--r-- | fml/lib/FML/Mailer.pm | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/fml/lib/FML/Mailer.pm b/fml/lib/FML/Mailer.pm index 0056ebac..7351a2ba 100644 --- a/fml/lib/FML/Mailer.pm +++ b/fml/lib/FML/Mailer.pm @@ -4,7 +4,7 @@ # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: Mailer.pm,v 1.1 2001/05/05 13:50:58 fukachan Exp $ +# $FML: Mailer.pm,v 1.2 2001/05/06 12:59:21 fukachan Exp $ # package FML::Mailer; @@ -95,6 +95,13 @@ sub send my $recipient = $args->{ recipient } || undef; my $recipients = $args->{ recipients } || [ $recipient ] || undef; + # error + if ((defined($recipient) && ref($recipient) ne '') || + (defined($recipients) && (ref($recipients)) ne 'ARRAY')) { + return 0; + } + + # Mail::Message object which is sent my $message = $args->{ message } || undef; my $file = $args->{ file } || undef; |
