Skip to content

Commit

Permalink
break bom detection loop when bom matched
Browse files Browse the repository at this point in the history
  • Loading branch information
zajca committed Aug 26, 2021
1 parent 1d1db84 commit f99d35f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/UTF8BOMHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public static function detectAndRemoveBOM($header)
] as $bomString) {
if (strpos($header[0], $bomString) === 0) {
$header[0] = trim(substr($header[0], strlen($bomString)), '"');
break;
}
}

Expand Down

0 comments on commit f99d35f

Please sign in to comment.