cvs: php4 /ext/mbstring mbstring.c
| From: | Rui Hirokawa | Date: | Wed, 16 Oct 2002 13:27:40 +0000 |
| Subject: | cvs: php4 /ext/mbstring mbstring.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-14960@lists.php.net to get a copy of this message | ||
hirokawa Wed Oct 16 09:27:40 2002 EDT
Modified files:
/php4/ext/mbstring mbstring.c
Log:
fixed a problem when mbstring.encoding_translation is defined per directory basis.
Index: php4/ext/mbstring/mbstring.c
diff -u php4/ext/mbstring/mbstring.c:1.103 php4/ext/mbstring/mbstring.c:1.104
--- php4/ext/mbstring/mbstring.c:1.103 Wed Oct 16 09:22:57 2002
+++ php4/ext/mbstring/mbstring.c Wed Oct 16 09:27:40 2002
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: mbstring.c,v 1.103 2002/10/16 13:22:57 hirokawa Exp $ */
+/* $Id: mbstring.c,v 1.104 2002/10/16 13:27:40 hirokawa Exp $ */
/*
* PHP4 Multibyte String module "mbstring" (currently only for Japanese)
@@ -654,6 +654,14 @@
{
if (new_value == NULL) {
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);