diff --git a/libs/upgradephp/upgrade.php b/libs/upgradephp/upgrade.php index 29fa9752d91..3ac2b8ae8c2 100644 --- a/libs/upgradephp/upgrade.php +++ b/libs/upgradephp/upgrade.php @@ -681,9 +681,22 @@ function utf8_decode($data) { * @param string $charset */ if(!function_exists('mb_strtolower')) { - function mb_strtolower($input, $charset) { - return strtolower($input); - } + function mb_strtolower($input, $charset = '') { + return strtolower($input); + } +} + +/** + * Use strlen if mb_strlen doesn't exist (i.e., php not compiled with --enable-mbstring) + * This is not a functional replacement for mb_strlen. + * + * @param string $input + * @param string $charset + */ +if(!function_exists('mb_strlen')) { + function mb_strlen($input, $charset = '') { + return strlen($input); + } } /**