From 997ba0afd8a4f0f3bab927713981b44a76aeb2cc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Tue, 14 Jun 2016 23:43:09 +0200 Subject: [PATCH] Fix check for body in Email::getJobs() --- wcfsetup/install/files/lib/system/email/Email.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/system/email/Email.class.php b/wcfsetup/install/files/lib/system/email/Email.class.php index 4764f3a0cd..0dc8c46538 100644 --- a/wcfsetup/install/files/lib/system/email/Email.class.php +++ b/wcfsetup/install/files/lib/system/email/Email.class.php @@ -476,7 +476,9 @@ class Email { $this->getHeaders(); // ensure the body is filled in - $this->getBodyString(); + if ($this->body === null) { + throw new \LogicException('Cannot generate message body, you must specify a body'); + } foreach ($this->recipients as $recipient) { $mail = clone $this; -- 2.20.1