summaryrefslogtreecommitdiff
path: root/Zend/zend_multibyte.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2005-11-15 13:29:39 +0000
committerDmitry Stogov <dmitry@php.net>2005-11-15 13:29:39 +0000
commita8c6b992b8894763c59276c1142971aa9a314500 (patch)
treecd160a00c80a2b4c903c85ee4c23432c1ca55241 /Zend/zend_multibyte.c
parent55190081694669150d38e760e2e1e498b21478fa (diff)
downloadphp-git-a8c6b992b8894763c59276c1142971aa9a314500.tar.gz
Fixed bug #35147 (__HALT_COMPILER() breaks with --enable-zend-multibyte)
Diffstat (limited to 'Zend/zend_multibyte.c')
-rw-r--r--Zend/zend_multibyte.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/Zend/zend_multibyte.c b/Zend/zend_multibyte.c
index d7a444b32e..348d47f96f 100644
--- a/Zend/zend_multibyte.c
+++ b/Zend/zend_multibyte.c
@@ -994,11 +994,13 @@ static zend_encoding* zend_multibyte_find_script_encoding(zend_encoding *onetime
return onetime_encoding;
}
- /* check out bom(byte order mark) and see if containing wchars */
- script_encoding = zend_multibyte_detect_unicode(TSRMLS_C);
- if (script_encoding != NULL) {
- /* bom or wchar detection is prior to 'script_encoding' option */
- return script_encoding;
+ if (CG(detect_unicode)) {
+ /* check out bom(byte order mark) and see if containing wchars */
+ script_encoding = zend_multibyte_detect_unicode(TSRMLS_C);
+ if (script_encoding != NULL) {
+ /* bom or wchar detection is prior to 'script_encoding' option */
+ return script_encoding;
+ }
}
/* if no script_encoding specified, just leave alone */