Skip to content

Commit f0c0800

Browse files
committed
fix: input missing string "\" error
1 parent a6bb15e commit f0c0800

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

laravel/app/Http/Repository/ToolRepository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function stringToHex($str)
5454
public function hexToString($input)
5555
{
5656
$hex = strtoupper($input);
57-
$hex = str_replace('\\X', '', $hex);
57+
$hex = str_replace(['\\X', 'X'], '', $hex);
5858
if (!preg_match("/^[A-Fa-f0-9]+$/", $hex)) {
5959
return '';
6060
}

0 commit comments

Comments
 (0)