summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Zend/zend.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Zend/zend.c b/Zend/zend.c
index 6913d51193..942b0a0c59 100644
--- a/Zend/zend.c
+++ b/Zend/zend.c
@@ -89,13 +89,13 @@ static ZEND_INI_MH(OnUpdateGCEnabled) /* {{{ */
static ZEND_INI_MH(OnUpdateScriptEncoding) /* {{{ */
{
- if (!CG(multibyte) || !new_value) {
+ if (!CG(multibyte)) {
return FAILURE;
}
if (!zend_multibyte_get_functions()) {
return SUCCESS;
}
- return zend_multibyte_set_script_encoding_by_string(new_value->val, new_value->len);
+ return zend_multibyte_set_script_encoding_by_string(new_value ? new_value->val : NULL, new_value ? new_value->len : 0);
}
/* }}} */