diff options
| author | fukachan <fukachan> | 2001-05-19 03:29:57 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2001-05-19 03:29:57 +0000 |
| commit | 472bbcbc374f446518c13581d834c501d5f92e27 (patch) | |
| tree | 151306f7e6cc5c32b96efd904352fc2859976df5 /fml | |
| parent | f12e7faf795f8b4016348ffbce149d1f2fcee188 (diff) | |
| download | fml8-472bbcbc374f446518c13581d834c501d5f92e27.tar.gz fml8-472bbcbc374f446518c13581d834c501d5f92e27.tar.bz2 fml8-472bbcbc374f446518c13581d834c501d5f92e27.zip | |
verify input: $args->{ message } is defined.
Diffstat (limited to 'fml')
| -rw-r--r-- | fml/lib/FML/Mailer.pm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fml/lib/FML/Mailer.pm b/fml/lib/FML/Mailer.pm index 7351a2ba..e231cf24 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.2 2001/05/06 12:59:21 fukachan Exp $ +# $FML: Mailer.pm,v 1.3 2001/05/18 14:59:21 fukachan Exp $ # package FML::Mailer; @@ -95,9 +95,10 @@ sub send my $recipient = $args->{ recipient } || undef; my $recipients = $args->{ recipients } || [ $recipient ] || undef; - # error + # validate input argument if ((defined($recipient) && ref($recipient) ne '') || - (defined($recipients) && (ref($recipients)) ne 'ARRAY')) { + (defined($recipients) && (ref($recipients)) ne 'ARRAY') || + (not defined($args->{ message }))) { return 0; } |
