mirror of
https://github.com/php/php-src.git
synced 2024-11-26 11:23:47 +08:00
interpret empty to_encoding as encoding not set what results in current_internal_encoding
This commit is contained in:
parent
995e6f6af0
commit
fffb1a5d21
@ -2070,7 +2070,7 @@ PHPAPI char * php_mb_convert_encoding(char *input, size_t length, char *_to_enco
|
||||
return NULL;
|
||||
}
|
||||
/* new encoding */
|
||||
if (_to_encoding) {
|
||||
if (_to_encoding && strlen(_to_encoding)) {
|
||||
to_encoding = mbfl_name2no_encoding(_to_encoding);
|
||||
if (to_encoding == mbfl_no_encoding_invalid) {
|
||||
php_error(E_WARNING, "%s() unknown encoding \"%s\"",
|
||||
|
Loading…
Reference in New Issue
Block a user