1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-01 19:00:20 +02:00

One day I will learn

This commit is contained in:
Jordi Boggiano
2022-03-14 13:41:10 +01:00
parent f1f2e3e37c
commit 330b80ceb7

View File

@@ -84,7 +84,8 @@ class SwiftMailerHandler extends MailHandler
}
if (!$message instanceof Swift_Message) {
throw new \InvalidArgumentException('Could not resolve message as instance of Swift_Message or a callable returning it' . Utils::getRecordMessageForException(reset($records)));
$record = reset($records);
throw new \InvalidArgumentException('Could not resolve message as instance of Swift_Message or a callable returning it' . ($record ? Utils::getRecordMessageForException($record) : ''));
}
if ($records) {