hirokawa Sun Mar 12 07:54:43 2006 UTC Modified files: (Branch: PHP_5_1) /php-src/ext/mbstring mbstring.c Log: MFH http://cvs.php.net/viewcvs.cgi/php-src/ext/mbstring/mbstring.c?r1=1.224.2.16&r2=1.224.2.17&diff_format=u Index: php-src/ext/mbstring/mbstring.c diff -u php-src/ext/mbstring/mbstring.c:1.224.2.16 php-src/ext/mbstring/mbstring.c:1.224.2.17 --- php-src/ext/mbstring/mbstring.c:1.224.2.16 Fri Mar 10 16:22:15 2006 +++ php-src/ext/mbstring/mbstring.c Sun Mar 12 07:54:42 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mbstring.c,v 1.224.2.16 2006/03/10 16:22:15 masugata Exp $ */ +/* $Id: mbstring.c,v 1.224.2.17 2006/03/12 07:54:42 hirokawa Exp $ */ /* * PHP 4 Multibyte String module "mbstring" @@ -687,6 +687,9 @@ /* {{{ static PHP_INI_MH(OnUpdate_mbstring_substitute_character) */ static PHP_INI_MH(OnUpdate_mbstring_substitute_character) { + int c; + char *endptr = NULL; + if (new_value != NULL) { if (strcasecmp("none", new_value) == 0) { MBSTRG(filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE; @@ -694,7 +697,12 @@ MBSTRG(filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_LONG; } else { MBSTRG(filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_CHAR; - MBSTRG(filter_illegal_substchar) = zend_atoi(new_value, new_value_length); + if (new_value_length >0) { + c = strtol(new_value, &endptr, 0); + if (*endptr == '\0') { + MBSTRG(filter_illegal_substchar) = c; + } + } } }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php