From 1afd59b507de08f1f22a1ea1bdd1a876edabbd26 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Sat, 6 May 2023 14:02:35 +0800 Subject: [PATCH] * Fix code error. --- module/task/zen.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/task/zen.php b/module/task/zen.php index a39a822ea1..f2e628c0ca 100644 --- a/module/task/zen.php +++ b/module/task/zen.php @@ -648,9 +648,9 @@ class taskZen extends task if(dao::isError()) return array('result' => 'fail', 'message' => dao::getError()); /* Return task id when call the API. */ + $taskID = $task->id; if($this->viewType == 'json' or (defined('RUN_MODE') && RUN_MODE == 'api')) return array('result' => 'success', 'message' => $this->lang->saveSuccess, 'id' => $taskID); - $taskID = $task->id; $response['result'] = 'success'; $response['message'] = $this->lang->saveSuccess;