Skip to content

Commit 333fa14

Browse files
authored
Merge pull request #37 from nguyenanhung/v3.2.0-develop
fixed v3.2.0
2 parents 3082f1f + bd1dd6c commit 333fa14

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
@@ -53,6 +53,9 @@ function codeigniter_hmvc_modules_list($with_location = true)
5353
if (!function_exists('bear_str_to_lower')) {
5454
function bear_str_to_lower($str)
5555
{
56+
if ($str === null) {
57+
return null;
58+
}
5659
if (function_exists('mb_strtolower')) {
5760
return mb_strtolower($str, 'UTF-8');
5861
}
@@ -63,6 +66,9 @@ function bear_str_to_lower($str)
6366
if (!function_exists('bear_str_to_upper')) {
6467
function bear_str_to_upper($str)
6568
{
69+
if ($str === null) {
70+
return null;
71+
}
6672
if (function_exists('mb_strtoupper')) {
6773
return mb_strtoupper($str, 'UTF-8');
6874
}
@@ -73,6 +79,9 @@ function bear_str_to_upper($str)
7379
if (!function_exists('bear_str_length')) {
7480
function bear_str_length($str)
7581
{
82+
if ($str === null) {
83+
return null;
84+
}
7685
if (function_exists('mb_strlen')) {
7786
return mb_strlen($str);
7887
}

0 commit comments

Comments
 (0)