Skip to content

Commit

Permalink
Utils::errorSanitizeString: Bugfix for empty string inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
jnvsor committed Dec 22, 2024
1 parent 63ae183 commit 486a8fb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
Binary file modified build/kint.phar
Binary file not shown.
2 changes: 1 addition & 1 deletion src/Utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ public static function isValidPhpNamespace(string $ns): bool
*/
public static function errorSanitizeString(string $input): string
{
if (KINT_PHP82) {
if (KINT_PHP82 || '' === $input) {
return $input;
}

Expand Down
2 changes: 2 additions & 0 deletions tests/UtilsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,8 @@ public function testErrorSanitizeString()
} else {
$this->assertSame('Hello', Utils::errorSanitizeString($input));
}

$this->assertSame('', Utils::errorSanitizeString(''));
}

public function blobProvider()
Expand Down

0 comments on commit 486a8fb

Please sign in to comment.