8000 [Mime] removed the 2 parts constraints on Multipart (not true for Dat… · symfony/symfony@e50ff4c · GitHub
[go: up one dir, main page]

Skip to content

Commit e50ff4c

Browse files
committed
[Mime] removed the 2 parts constraints on Multipart (not true for DataFormPart for instance)
1 parent 0450c4f commit e50ff4c

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

src/Symfony/Component/Mime/Part/AbstractMultipartPart.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,6 @@ public function getPreparedHeaders(): Headers
5757
public function bodyToString(): string
5858
{
5959
$parts = $this->getParts();
60-
61-
if (\count($parts) < 2) {
62-
throw new LogicException(sprintf('A "%s" instance must have at least 2 parts.', __CLASS__));
63-
}
64-
6560
$string = '';
6661
foreach ($parts as $part) {
6762
$string .= '--'.$this->getBoundary()."\r\n".$part->toString()."\r\n";
@@ -74,11 +69,6 @@ public function bodyToString(): string
7469
public function bodyToIterable(): iterable
7570
{
7671
$parts = $this->getParts();
77-
78-
if (\count($parts) < 2) {
79-
throw new LogicException(sprintf('A "%s" instance must have at least 2 parts.', __CLASS__));
80-
}
81-
8272
foreach ($parts as $part) {
8373
yield '--'.$this->getBoundary()."\r\n";
8474
foreach ($part->toIterable() as $chunk) {

0 commit comments

Comments
 (0)
0