From d58eaaecc9675dbc857620ccfecbe5c44e4039e9 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Tue, 12 Nov 2024 13:58:00 +0800 Subject: [PATCH] * [refac bug #56883] check var exist or not. --- module/common/model.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/common/model.php b/module/common/model.php index 14347a74e1..6c2611be73 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -1941,7 +1941,7 @@ eof; { if(!isset($executionsStatus[$object->execution])) { - $execution = $commonModel->loadModel('execution')->getByID($object->execution); + $execution = $commonModel->loadModel('execution')->getByID((int)$object->execution); $executionsStatus[$object->execution] = $execution ? $execution->status : ''; } if($executionsStatus[$object->execution] == 'closed' || !empty($config->CRProject)) return false; @@ -1952,7 +1952,7 @@ eof; $project = $commonModel->loadModel('project')->getByID((int)$object->project); $projectsStatus[$object->project] = $project ? $project->status : ''; } - if($projectsStatus[$object->project] == 'closed') return false; + if(isset($object->project) && $projectsStatus[$object->project] == 'closed') return false; } return true;