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

Skip to content

Commit 5c8a4e3

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

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

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

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
namespace Symfony\Component\Mime\Part;
1313

14-
use Symfony\Component\Mime\Exception\LogicException;
1514
use Symfony\Component\Mime\Header\Headers;
1615

1716
/**
@@ -57,11 +56,6 @@ public function getPreparedHeaders(): Headers
5756
public function bodyToString(): string
5857
{
5958
$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-
6559
$string = '';
6660
foreach ($parts as $part) {
6761
$string .= '--'.$this->getBoundary()."\r\n".$part->toString()."\r\n";
@@ -74,11 +68,6 @@ public function bodyToString(): string
7468
public function bodyToIterable(): iterable
7569
{
7670
$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-
8271
foreach ($parts as $part) {
8372
yield '--'.$this->getBoundary()."\r\n";
8473
foreach ($part->toIterable() as $chunk) {

0 commit comments

Comments
 (0)
0