Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 344e456

Browse filesBrowse files
GenieTimnicolas-grekas
authored andcommitted
[Mbstring] fix throwing from mb_substitute_character on PHP >= 8
1 parent 9174a3d commit 344e456
Copy full SHA for 344e456

File tree

Expand file treeCollapse file tree

1 file changed

+3
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-0
lines changed

‎Mbstring.php

Copy file name to clipboardExpand all lines: Mbstring.php
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -602,6 +602,9 @@ public static function mb_substitute_character($c = null)
602602
if (80000 > \PHP_VERSION_ID) {
603603
return false;
604604
}
605+
if (\is_int($c) || 'long' === $c || 'entity' === $c) {
606+
return false;
607+
}
605608

606609
throw new \ValueError('Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint');
607610
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.