File tree 1 file changed +2
-2
lines changed
src/Symfony/Component/Mime 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -130,11 +130,11 @@ public function toIterable(): iterable
130
130
*/
131
131
public function ensureValidity ()
132
132
{
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()) {
134
134
throw new LogicException ('An email must have a "To", "Cc", or "Bcc" header. ' );
135
135
}
136
136
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()) {
138
138
throw new LogicException ('An email must have a "From" or a "Sender" header. ' );
139
139
}
140
140
You can’t perform that action at this time.
0 commit comments