Permalink
Browse files

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.
  • Loading branch information...
1 parent e120a0c commit 3a4a25358fe3f389c434f68e59bfd70b25b93b29 @weltling weltling committed May 8, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 ext/standard/html.c
View
@@ -793,8 +793,11 @@ static enum entity_charset determine_charset(char *charset_hint TSRMLS_DC)
charset_hint = NULL;
len = 0;
}
+ } else {
+ /* Jump to det_charset only if mbstring isn't one of above eq pass, auto, none.
+ Otherwise try default_charset next */
+ goto det_charset;
}
- goto det_charset;
}
}
#endif

0 comments on commit 3a4a253

Please sign in to comment.