hirokawa Sun Mar 12 07:54:56 2006 UTC Modified files: (Branch: PHP_4_4) /php-src/ext/mbstring mbstring.c Log: MFH http://cvs.php.net/viewcvs.cgi/php-src/ext/mbstring/mbstring.c?r1=1.142.2.47.2.11&r2=1.142.2.47.2.12&diff_format=u Index: php-src/ext/mbstring/mbstring.c diff -u php-src/ext/mbstring/mbstring.c:1.142.2.47.2.11 php-src/ext/mbstring/mbstring.c:1.142.2.47.2.12 --- php-src/ext/mbstring/mbstring.c:1.142.2.47.2.11 Fri Mar 10 16:15:35 2006 +++ php-src/ext/mbstring/mbstring.c Sun Mar 12 07:54:56 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mbstring.c,v 1.142.2.47.2.11 2006/03/10 16:15:35 masugata Exp $ */ +/* $Id: mbstring.c,v 1.142.2.47.2.12 2006/03/12 07:54:56 hirokawa Exp $ */ /* * PHP4 Multibyte String module "mbstring" @@ -757,6 +757,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; @@ -764,7 +767,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