Merge pull request #6900 from JediKev/issue/microsoft-utf8-bom
Reviewed-By: JediKev <kevin@enhancesoft.com>
This commit is contained in:
@@ -88,6 +88,10 @@ class Headers implements Countable, Iterator
|
||||
*/
|
||||
public static function fromString($string, $eol = self::EOL)
|
||||
{
|
||||
// PATCH: Strip UTF-8 BOM
|
||||
if (preg_match("/^\xEF\xBB\xBF/", $string))
|
||||
$string = preg_replace('/^\xEF\xBB\xBF/', '', $string);
|
||||
|
||||
$headers = new static();
|
||||
$currentLine = '';
|
||||
$emptyLine = 0;
|
||||
|
||||
Reference in New Issue
Block a user