You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Symfony/Component/Mime/Header/Headers.php
+21-5Lines changed: 21 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -34,8 +34,8 @@ final class Headers
34
34
'cc' => MailboxListHeader::class,
35
35
'bcc' => MailboxListHeader::class,
36
36
'message-id' => IdentificationHeader::class,
37
-
'in-reply-to' => UnstructuredHeader::class, // `In-Reply-To` and `References` are less strict than RFC 2822 (3.6.4) to allow users entering the original email's ...
38
-
'references' => UnstructuredHeader::class, // ... `Message-ID`, even if that is no valid `msg-id`
37
+
'in-reply-to' => [UnstructuredHeader::class, IdentificationHeader::class], // `In-Reply-To` and `References` are less strict than RFC 2822 (3.6.4) to allow users entering the original email's ...
38
+
'references' => [UnstructuredHeader::class, IdentificationHeader::class], // ... `Message-ID`, even if that is no valid `msg-id`
39
39
'return-path' => PathHeader::class,
40
40
];
41
41
@@ -137,7 +137,11 @@ public function addParameterizedHeader(string $name, string $value, array $param
if (($c = self::HEADER_CLASS_MAP[$name] ?? null) && !$headerinstanceof$c) {
225
-
thrownewLogicException(sprintf('The "%s" header must be an instance of "%s" (got "%s").', $header->getName(), $c, get_debug_type($header)));
236
+
foreach ($headerClassesas$c) {
237
+
if ($headerinstanceof$c) {
238
+
return;
239
+
}
226
240
}
241
+
242
+
thrownewLogicException(sprintf('The "%s" header must be an instance of "%s" (got "%s").', $header->getName(), implode('" or "', $headerClasses), get_debug_type($header)));
0 commit comments