]> granicus.if.org Git - php/commitdiff
fixed a problem when mbstring.encoding_translation is defined per directory basis.
authorRui Hirokawa <hirokawa@php.net>
Wed, 16 Oct 2002 13:27:40 +0000 (13:27 +0000)
committerRui Hirokawa <hirokawa@php.net>
Wed, 16 Oct 2002 13:27:40 +0000 (13:27 +0000)
ext/mbstring/mbstring.c

index e9f523e2d58ce863cc2175d5432f642102e09a7f..d39404347bf96003d40832b997cf9e9f60c85693 100644 (file)
@@ -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)){