* [apiv2] Fix unicode string.

This commit is contained in:
朱金勇
2026-01-05 14:56:41 +08:00
parent 709ba259c9
commit 7fdba63c82
2 changed files with 9 additions and 2 deletions
+1 -1
View File
@@ -221,7 +221,7 @@ class form extends fixer
if(!empty($this->errors))
{
$response = array('result' => 'fail', 'message' => $this->errors);
helper::end(json_encode($response));
helper::end(json_encode($response, JSON_UNESCAPED_UNICODE));
}
return $this;
+8 -1
View File
@@ -945,7 +945,14 @@ class taskZen extends task
->setDefault('assignedTo', $oldTask->openedBy)
->get();
$task->realStarted = date('Y-m-d H:i', strtotime($task->realStarted));
if(!$this->post->realStarted)
{
dao::$errors['realStarted'][] = sprintf($this->lang->error->notempty, $this->lang->task->realStarted);
}
else
{
$task->realStarted = date('Y-m-d H:i', strtotime($task->realStarted));
}
if(strpos(",{$this->config->task->finish->requiredFields},", ',comment,') !== false && empty($_POST['comment'])) dao::$errors['comment'] = sprintf($this->lang->error->notempty, $this->lang->comment);
if(!$this->post->currentConsumed && $oldTask->consumed == '0') dao::$errors['currentConsumed'][] = $this->lang->task->error->consumedEmpty;