Fix check for body in Email::getJobs()
authorTim Düsterhus <duesterhus@woltlab.com>
Tue, 14 Jun 2016 21:43:09 +0000 (23:43 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Tue, 14 Jun 2016 21:43:56 +0000 (23:43 +0200)
wcfsetup/install/files/lib/system/email/Email.class.php

index 4764f3a0cd8a4a6b2c756c8a9475b57f33ae05c8..0dc8c46538ecbaa4a7e4e831c30e6067b8981569 100644 (file)
@@ -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;