Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 945c7c5 commit b2d7454Copy full SHA for b2d7454
src/Symfony/Component/Mime/Header/Headers.php
@@ -201,7 +201,7 @@ public function remove(string $name): void
201
202
public static function isUniqueHeader(string $name): bool
203
{
204
- return \in_array($name, self::UNIQUE_HEADERS, true);
+ return \in_array(strtolower($name), self::UNIQUE_HEADERS, true);
205
}
206
207
public function toString(): string
src/Symfony/Component/Mime/Tests/Header/HeadersTest.php
@@ -212,6 +212,11 @@ public function testRemoveIsNotCaseSensitive()
212
$this->assertFalse($headers->has('Message-ID'));
213
214
215
+ public function testIsUniqueHeaderIsNotCaseSensitive()
216
+ {
217
+ $this->assertTrue(Headers::isUniqueHeader('From'));
218
+ }
219
+
220
public function testToStringJoinsHeadersTogether()
221
222
$headers = new Headers();
0 commit comments