Skip to content

Commit aebfcd2

Browse files
committed
refactor: additional check before utf8_encode
1 parent ad686ba commit aebfcd2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

server/services/search.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function packParamsJSON($params_array, $post_params)
3131
function utf8_converter($array)
3232
{
3333
array_walk_recursive($array, function (&$item, $key) {
34-
if (!mb_detect_encoding($item, 'utf-8', true)) {
34+
if ($item !== null && !mb_detect_encoding($item, 'utf-8', true)) {
3535
$item = utf8_encode($item);
3636
}
3737
});

0 commit comments

Comments
 (0)