diff options
| author | Rui Hirokawa <hirokawa@php.net> | 2008-02-16 12:01:43 +0000 | 
|---|---|---|
| committer | Rui Hirokawa <hirokawa@php.net> | 2008-02-16 12:01:43 +0000 | 
| commit | bedb3089023dcfa610f3ce2ebbbae94da425c462 (patch) | |
| tree | 5d2ab39f5c3b212a4e2ae910b2b50a90e60c26df /ext/mbstring/php_unicode.c | |
| parent | ad400f11449bec5c98b5e261ccf5d534d71f5056 (diff) | |
| download | php-git-bedb3089023dcfa610f3ce2ebbbae94da425c462.tar.gz | |
fixed #43998  	Two error messages returned for incorrect encoding for mb_strto[upper|lower]
Diffstat (limited to 'ext/mbstring/php_unicode.c')
| -rw-r--r-- | ext/mbstring/php_unicode.c | 5 | 
1 files changed, 5 insertions, 0 deletions
| diff --git a/ext/mbstring/php_unicode.c b/ext/mbstring/php_unicode.c index ca30db73b2..d90cabb84d 100644 --- a/ext/mbstring/php_unicode.c +++ b/ext/mbstring/php_unicode.c @@ -276,6 +276,11 @@ MBSTRING_API char *php_unicode_convert_case(int case_mode, char *srcstr, size_t  	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; | 
