hirokawa Sat Feb 16 12:01:43 2008 UTC
Modified files: (Branch: PHP_5_3)
/php-src/ext/mbstring php_unicode.c
Log:
fixed #43998 Two error messages returned for incorrect encoding for
mb_strto[upper|lower]
http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/php_unicode.c?r1=1.11.2.2.2.2.2.1&r2=1.11.2.2.2.2.2.2&diff_format=u
Index: php-src/ext/mbstring/php_unicode.c
diff -u php-src/ext/mbstring/php_unicode.c:1.11.2.2.2.2.2.1
php-src/ext/mbstring/php_unicode.c:1.11.2.2.2.2.2.2
--- php-src/ext/mbstring/php_unicode.c:1.11.2.2.2.2.2.1 Mon Dec 31 07:17:09 2007
+++ php-src/ext/mbstring/php_unicode.c Sat Feb 16 12:01:43 2008
@@ -276,6 +276,11 @@
size_t i;
enum mbfl_no_encoding _src_encoding =
mbfl_name2no_encoding(src_encoding);
+ if (_src_encoding == mbfl_no_encoding_invalid) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown encoding
\"%s\"", src_encoding);
+ return NULL;
+ }
+
unicode = php_mb_convert_encoding(srcstr, srclen, "UCS-4BE",
src_encoding, &unicode_len TSRMLS_CC);
if (unicode == NULL)
return NULL;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php