Skip to content
This repository has been archived by the owner on Nov 22, 2024. It is now read-only.

Commit

Permalink
Merge pull request #21 from weierophinney/hotfix/cast-null-to-empty-s…
Browse files Browse the repository at this point in the history
…tring

Do not pass null value to strtolower
  • Loading branch information
weierophinney authored Sep 20, 2021
2 parents 02cc861 + bbe459f commit 72d21a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Decode.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ public static function splitContentType($type, $wantedPart = null)
*/
public static function splitHeaderField($field, $wantedPart = null, $firstName = '0')
{
$wantedPart = strtolower($wantedPart);
$wantedPart = strtolower($wantedPart ?? '');
$firstName = strtolower($firstName);

// special case - a bit optimized
Expand Down

0 comments on commit 72d21a1

Please sign in to comment.