Skip to content

Commit 3a4a253

Browse files
committed
Fix bug #61713 ext\standard\tests\strings\htmlentities10.phpt fails
There is a logic error in charset detection part for htmlentities. When mbstring is compiled shared and mbstring.internal_encoding is set to pass, it prevents default_charset from being checked resulting iso-8859-1 being choosed.
1 parent e120a0c commit 3a4a253

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ext/standard/html.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -793,8 +793,11 @@ static enum entity_charset determine_charset(char *charset_hint TSRMLS_DC)
793793
charset_hint = NULL;
794794
len = 0;
795795
}
796+
} else {
797+
/* Jump to det_charset only if mbstring isn't one of above eq pass, auto, none.
798+
Otherwise try default_charset next */
799+
goto det_charset;
796800
}
797-
goto det_charset;
798801
}
799802
}
800803
#endif

0 commit comments

Comments
 (0)