Fix compatibility with PHP 5.4

This commit is contained in:
zhangrunyu
2022-01-13 10:14:15 +08:00
parent 8ab6050b34
commit 39e30fc64f
10 changed files with 77 additions and 35 deletions
+1 -1
View File
@@ -1901,7 +1901,7 @@ class bugModel extends model
{
$data->name = isset($executions[$executionID]) ? $executions[$executionID] : $this->lang->report->undefined;
$data->title = $data->name;
if(mb_strlen($data->name) > $maxLength) $data->name = mb_substr($data->name, 0, $maxLength) . '...';
if(mb_strlen($data->name, 'UTF-8') > $maxLength) $data->name = mb_substr($data->name, 0, $maxLength, 'UTF-8') . '...';
}
return $datas;
}