diff --git a/src/PhpSpreadsheet/Shared/StringHelper.php b/src/PhpSpreadsheet/Shared/StringHelper.php index d1422c76c7..435d0e4cda 100644 --- a/src/PhpSpreadsheet/Shared/StringHelper.php +++ b/src/PhpSpreadsheet/Shared/StringHelper.php @@ -490,7 +490,7 @@ public static function substring($textValue, $offset, $length = 0) */ public static function strToUpper($textValue) { - return mb_convert_case($textValue, MB_CASE_UPPER, 'UTF-8'); + return mb_convert_case($textValue ?? '', MB_CASE_UPPER, 'UTF-8'); } /**