mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Also set mb_regex_encoding.
This fixes issues with corrupt bytes when you change the default encoding and use regular expressions. Fixes #3800
This commit is contained in:
parent
9b7cd0286f
commit
b41051c8ab
1 changed files with 3 additions and 0 deletions
|
@ -174,6 +174,9 @@ if (function_exists('mb_internal_encoding')) {
|
||||||
if (!empty($encoding)) {
|
if (!empty($encoding)) {
|
||||||
mb_internal_encoding($encoding);
|
mb_internal_encoding($encoding);
|
||||||
}
|
}
|
||||||
|
if (!empty($encoding) && function_exists('mb_regex_encoding')) {
|
||||||
|
mb_regex_encoding($encoding);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!function_exists('mb_stripos')) {
|
if (!function_exists('mb_stripos')) {
|
||||||
|
|
Loading…
Reference in a new issue