From e8f33967b93fce3fbfca564bc070f690c7e56067 Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Wed, 26 Jul 2023 09:26:08 +0800 Subject: [PATCH] * Fix #task #98533, bug #36678. --- module/program/control.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/module/program/control.php b/module/program/control.php index a5f70686ac..9f842648cc 100644 --- a/module/program/control.php +++ b/module/program/control.php @@ -142,9 +142,10 @@ class program extends control { $programPairs = $this->program->getPairs(); - if(defined('RUN_MODE') && RUN_MODE == 'api' && !isset($programPairs[$programID])) + if(!isset($programPairs[$programID])) { - return $this->send(array('status' => 'fail', 'code' => 404, 'message' => '404 Not found')); + if(defined('RUN_MODE') && RUN_MODE == 'api') return $this->send(array('status' => 'fail', 'message' => '404 Not found')); + return print(js::error($this->lang->notFound) . js::locate($this->createLink('program', 'browse'))); } $programID = $this->program->saveState($programID, $programPairs);