diff options
| -rw-r--r-- | ext/mbstring/mbstring.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index e9f523e2d5..d39404347b 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -656,6 +656,14 @@ static PHP_INI_MH(OnUpdate_mbstring_encoding_translation) return FAILURE; } + if(!strncasecmp(new_value, "off", sizeof("off"))) { + new_value = "0"; + new_value_length = sizeof("0"); + } else if(!strncasecmp(new_value, "on", sizeof("on"))) { + new_value = "1"; + new_value_length = sizeof("1"); + } + MBSTRG(encoding_translation) = (zend_bool) atoi(new_value); if (MBSTRG(encoding_translation)){ |
