Skip to content

Commit

Permalink
Merge branch 'wip' into mb_trim_functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Fan2Shrek committed Jun 19, 2024
2 parents 5943e9c + df05ca6 commit b744b31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Mbstring/Mbstring.php
Original file line number Diff line number Diff line change
Expand Up @@ -1017,7 +1017,7 @@ private static function mb_internal_trim(string $regex, string $string, ?string
}

$regexCharacter = preg_quote($characters ?? '', '/');
$regex = sprintf('/'.$regex.'/', $regexCharacter, $regexCharacter);
$regex = sprintf($regex, $regexCharacter, $regexCharacter);

if ('ASCII' === mb_detect_encoding($characters) && 'ASCII' === mb_detect_encoding($string) && !empty(array_intersect(str_split(self::CHARACTERS), str_split($string)))) {
$options = 'g';
Expand Down

0 comments on commit b744b31

Please sign in to comment.