[Twig] Add missing check
This commit is contained in:
parent
85d10114e0
commit
5b5b7de660
@ -105,6 +105,10 @@ class NotificationEmail extends TemplatedEmail
|
||||
*/
|
||||
public function exception($exception)
|
||||
{
|
||||
if (!$exception instanceof \Throwable && !$exception instanceof FlattenException) {
|
||||
throw new \LogicException(sprintf('"%s" accepts "%s" or "%s" instances.', __METHOD__, \Throwable::class, FlattenException::class));
|
||||
}
|
||||
|
||||
$exceptionAsString = $this->getExceptionAsString($exception);
|
||||
|
||||
$this->context['exception'] = true;
|
||||
|
Reference in New Issue
Block a user