Skip to content

Commit 06f0f28

Browse files
committed
Pass only non-empty string to strtr(), otherwise it throws a warning
1 parent badb842 commit 06f0f28

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

src/PhpInfo.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ public function doNotSanitizeSessionId(): self
6666
}
6767

6868

69+
/**
70+
* @param non-empty-string $sanitize
71+
*/
6972
public function addSanitization(string $sanitize, ?string $with = null): self
7073
{
7174
$this->sanitizer->addSanitization($sanitize, $with);

src/SensitiveValueSanitizer.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ public function doNotSanitizeSessionId(): self
6262
}
6363

6464

65+
/**
66+
* @param non-empty-string $sanitize
67+
*/
6568
public function addSanitization(string $sanitize, ?string $with = null): self
6669
{
6770
$this->sanitize[$sanitize] = $this->sanitize[urlencode($sanitize)] = $with ?? $this->sanitizeWith;

0 commit comments

Comments
 (0)