]> granicus.if.org Git - php/commitdiff
better fix for script encoding ini
authorAnatol Belski <ab@php.net>
Tue, 23 Dec 2014 16:33:30 +0000 (17:33 +0100)
committerAnatol Belski <ab@php.net>
Tue, 23 Dec 2014 16:33:30 +0000 (17:33 +0100)
Zend/zend.c

index 6913d511937f5e26eea45654a6d23f1df0929ad0..942b0a0c59b41d58300d4bac507772ffe94ea220 100644 (file)
@@ -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);
 }
 /* }}} */