Skip to content

Commit

Permalink
allow null string in StringExtension
Browse files Browse the repository at this point in the history
Fix #3250
  • Loading branch information
garak committed Feb 6, 2020
1 parent b71ca9a commit 9905d44
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/StringExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ public function getFilters()
];
}

public function createUnicodeString(string $text): UnicodeString
public function createUnicodeString(?string $text): UnicodeString
{
return new UnicodeString($text);
return new UnicodeString($text ?? '');
}
}

0 comments on commit 9905d44

Please sign in to comment.