Replaced "contains" by "indexOf" (chrome issue)

- added public ajax routing (not checking permissions)
- exception handling in form subscription
This commit is contained in:
Jonathan Labreuille
2016-03-01 13:18:36 +01:00
parent c721843c12
commit 82ed7e51c5
4 changed files with 32 additions and 16 deletions

View File

@ -146,7 +146,7 @@ class Subscriber extends Model {
)
);
// convert subsdriber to array
// convert subscriber to array
$subscriber = $this->asArray();
// set from
@ -163,14 +163,13 @@ class Subscriber extends Model {
) ? $signup_confirmation['reply_to']
: false;
// send email
$mailer = new Mailer(
false,
$from,
$reply_to
);
return $mailer->send($email, $subscriber);
try {
$mailer = new Mailer(false, $from, $reply_to);
return $mailer->send($email, $subscriber);
} catch(\Exception $e) {
return false;
}
}
return false;
}