Have the same problem with Carbon::createFromFormat()
try {
$this->app_from = $date->createFromFormat('Y-m-d',
$this->request->cookie('app_from'));//$date->subDays(7);//date('Y-m-d',
strtotime("-7 days"));
$this->app_to = $date->createFromFormat('Y-m-d',
$this->request->cookie('app_to'));
How can we catch an invalid email exception? Cake throws and
invalidargumentexception.
Invalid email: "bassdsd.cs#adcdc.com"InvalidArgumentException
This does not work, the catch is not reached:
$toEmailAddress = "bassdsd.cs#adcdc.com";
$email = new Email('default');
try
{
$email->t