From: Rui Hirokawa Date: Wed, 16 Oct 2002 13:27:40 +0000 (+0000) Subject: fixed a problem when mbstring.encoding_translation is defined per directory basis. X-Git-Tag: php-4.3.0pre2~342 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=585eefca14e023ff1e60546df074825f008f0ae3;p=php fixed a problem when mbstring.encoding_translation is defined per directory basis. --- 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)){