summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatoliy Belsky <ab@php.net>2012-05-08 17:42:01 +0200
committerAnatoliy Belsky <ab@php.net>2012-05-08 17:42:01 +0200
commit3a4a25358fe3f389c434f68e59bfd70b25b93b29 (patch)
tree4666620a0cca42b61b69be6083c9cef6a16aef31
parente120a0c7f30953774d3ff2ac1a14b2ab623a047c (diff)
downloadphp-git-3a4a25358fe3f389c434f68e59bfd70b25b93b29.tar.gz
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.
-rw-r--r--ext/standard/html.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/standard/html.c b/ext/standard/html.c
index 81c69de217..c813af523c 100644
--- a/ext/standard/html.c
+++ b/ext/standard/html.c
@@ -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