diff options
Diffstat (limited to 'perllib')
-rw-r--r-- | perllib/FixMyStreet/Email.pm | 2 | ||||
-rw-r--r-- | perllib/FixMyStreet/EmailSend.pm | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/perllib/FixMyStreet/Email.pm b/perllib/FixMyStreet/Email.pm index a65a5e340..e81067da1 100644 --- a/perllib/FixMyStreet/Email.pm +++ b/perllib/FixMyStreet/Email.pm @@ -91,7 +91,7 @@ sub send_cron { if (!FixMyStreet->test_mode && $env_from eq FixMyStreet->config('CONTACT_EMAIL')) { $model_args{mailer} = 'FixMyStreet::EmailSend::ContactEmail'; } - my $result = FixMyStreet::EmailSend->new(%model_args)->send($email); + my $result = FixMyStreet::EmailSend->new(\%model_args)->send($email); return $result ? 0 : 1; } } diff --git a/perllib/FixMyStreet/EmailSend.pm b/perllib/FixMyStreet/EmailSend.pm index 29c93b2d6..1c6e2cf7a 100644 --- a/perllib/FixMyStreet/EmailSend.pm +++ b/perllib/FixMyStreet/EmailSend.pm @@ -64,7 +64,8 @@ if ( FixMyStreet->test_mode ) { } sub new { - my ($cls, %hash) = @_; - my %args = ( %$args, %hash ); + my ($cls, $hash) = @_; + $hash ||= {}; + my %args = ( %$args, %$hash ); return Email::Send->new(\%args); } |