Skip to content

Commit

Permalink
When null passed, return empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
wallacemaxters committed Jun 9, 2024
1 parent 5e8115f commit 728f337
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Masker.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ public function __construct(

public function mask(?string $value, string $mask): string
{
if ($value === null) return '';

$format = $this->convertToInternalFormat($mask);

try {
Expand Down

0 comments on commit 728f337

Please sign in to comment.