Skip to content

Commit 864b170

Browse files
committed
Processed PR feedback for symfony#57065: using ! instead of empty
1 parent ded0d67 commit 864b170

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Component/Mime/Message.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,11 @@ public function toIterable(): iterable
130130
*/
131131
public function ensureValidity()
132132
{
133-
if (empty($this->headers->get('To')?->getBody()) && empty($this->headers->get('Cc')?->getBody()) && empty($this->headers->get('Bcc')?->getBody())) {
133+
if (!$this->headers->get('To')?->getBody() && !$this->headers->get('Cc')?->getBody() && !$this->headers->get('Bcc')?->getBody()) {
134134
throw new LogicException('An email must have a "To", "Cc", or "Bcc" header.');
135135
}
136136

137-
if (empty($this->headers->get('From')?->getBody()) && empty($this->headers->get('Sender')?->getBody())) {
137+
if (!$this->headers->get('From')?->getBody() && !$this->headers->get('Sender')?->getBody()) {
138138
throw new LogicException('An email must have a "From" or a "Sender" header.');
139139
}
140140

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy