diff --git a/module/execution/model.php b/module/execution/model.php index 91023c612d..b5748b101e 100755 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -593,7 +593,7 @@ class executionModel extends model } $relatedExecutionsID = $this->getRelatedExecutions($executionID); - $relatedExecutionsID = !empty($relatedExecutionsID) ? implode("','", array_keys($relatedExecutionsID)) : ''; + $relatedExecutionsID = !empty($relatedExecutionsID) ? implode(',', array_keys($relatedExecutionsID)) : ''; /* Update data. */ $this->lang->error->unique = $this->lang->error->repeat; @@ -604,7 +604,7 @@ class executionModel extends model ->checkIF($execution->begin != '', 'begin', 'date') ->checkIF($execution->end != '', 'end', 'date') ->checkIF($execution->end != '', 'end', 'ge', $execution->begin) - ->checkIF(!empty($execution->name), 'name', 'unique', "id in ('$relatedExecutionsID') and type in ('sprint','stage', 'kanban') and `project` = '$executionProject' and `deleted` = '0'") + ->checkIF(!empty($execution->name), 'name', 'unique', "id in ($relatedExecutionsID) and type in ('sprint','stage', 'kanban') and `project` = '$executionProject' and `deleted` = '0'") ->checkIF(!empty($execution->code), 'code', 'unique', "id != $executionID and type in ('sprint','stage', 'kanban') and `deleted` = '0'") ->checkFlow() ->where('id')->eq($executionID)