* Fix #task #98533, bug #36678.

This commit is contained in:
tanghucheng
2023-07-26 09:26:08 +08:00
parent 099ae0b879
commit e8f33967b9
+3 -2
View File
@@ -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);