Skip to content

Commit 06a9cf3

Browse files
committed
fixed v3.1-stable
1 parent 4dffbf3 commit 06a9cf3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

helpers/common.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
if (!function_exists('bear_str_to_lower')) {
1111
function bear_str_to_lower($str)
1212
{
13+
if ($str === null) {
14+
return null;
15+
}
1316
if (function_exists('mb_strtolower')) {
1417
return mb_strtolower($str, 'UTF-8');
1518
}
@@ -20,6 +23,9 @@ function bear_str_to_lower($str)
2023
if (!function_exists('bear_str_to_upper')) {
2124
function bear_str_to_upper($str)
2225
{
26+
if ($str === null) {
27+
return null;
28+
}
2329
if (function_exists('mb_strtoupper')) {
2430
return mb_strtoupper($str, 'UTF-8');
2531
}
@@ -30,6 +36,9 @@ function bear_str_to_upper($str)
3036
if (!function_exists('bear_str_length')) {
3137
function bear_str_length($str)
3238
{
39+
if ($str === null) {
40+
return null;
41+
}
3342
if (function_exists('mb_strlen')) {
3443
return mb_strlen($str);
3544
}

0 commit comments

Comments
 (0)