Skip to content

Commit

Permalink
fixed v3.1-stable
Browse files Browse the repository at this point in the history
  • Loading branch information
hungnguyenhp committed Jun 16, 2023
1 parent 4dffbf3 commit 06a9cf3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions helpers/common.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
if (!function_exists('bear_str_to_lower')) {
function bear_str_to_lower($str)
{
if ($str === null) {
return null;
}
if (function_exists('mb_strtolower')) {
return mb_strtolower($str, 'UTF-8');
}
Expand All @@ -20,6 +23,9 @@ function bear_str_to_lower($str)
if (!function_exists('bear_str_to_upper')) {
function bear_str_to_upper($str)
{
if ($str === null) {
return null;
}
if (function_exists('mb_strtoupper')) {
return mb_strtoupper($str, 'UTF-8');
}
Expand All @@ -30,6 +36,9 @@ function bear_str_to_upper($str)
if (!function_exists('bear_str_length')) {
function bear_str_length($str)
{
if ($str === null) {
return null;
}
if (function_exists('mb_strlen')) {
return mb_strlen($str);
}
Expand Down

0 comments on commit 06a9cf3

Please sign in to comment.