projects
/
koha_fer
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bug 6939 DefaultClassificationSource should be default in 942
[koha_fer]
/
C4
/
Letters.pm
diff --git
a/C4/Letters.pm
b/C4/Letters.pm
index
514b355
..
4bde166
100644
(file)
--- a/
C4/Letters.pm
+++ b/
C4/Letters.pm
@@
-672,6
+672,13
@@
sub EnqueueLetter ($) {
return unless exists $params->{'borrowernumber'};
return unless exists $params->{'message_transport_type'};
return unless exists $params->{'borrowernumber'};
return unless exists $params->{'message_transport_type'};
+ my $content = $params->{letter}->{content};
+ $content =~ s/\s+//g if(defined $content);
+ if ( not defined $content or $content eq '' ) {
+ warn "Trying to add an empty message to the message queue" if $debug;
+ return;
+ }
+
# If we have any attachments we should encode then into the body.
if ( $params->{'attachments'} ) {
$params->{'letter'} = _add_attachments(
# If we have any attachments we should encode then into the body.
if ( $params->{'attachments'} ) {
$params->{'letter'} = _add_attachments(