diff --git a/module/gitlab/model.php b/module/gitlab/model.php index 5bd5a65153..c16d1c1af8 100644 --- a/module/gitlab/model.php +++ b/module/gitlab/model.php @@ -279,9 +279,16 @@ class gitlabModel extends model $refList = array(); $branches = $this->loadModel('gitlab')->apiGetBranches($gitlabID, $projectID); $tags = $this->loadModel('gitlab')->apiGetTags($gitlabID, $projectID); + + /* fix bug 14612*/ + if(isset($branches->message)) return array(); + + if(isset($branches->error)) return array(); + foreach($branches as $branch) $refList[] = "Branch::" . $branch->name; foreach($tags as $tag) $refList[] = "Tag::" . $tag->name; return $refList; + } /** diff --git a/module/job/view/exec.html.php b/module/job/view/exec.html.php index 140725b899..5390c53d4f 100644 --- a/module/job/view/exec.html.php +++ b/module/job/view/exec.html.php @@ -21,7 +21,7 @@ job->runPipeline); + echo html::submitButton($lang->job->runPipeline, '', empty($refList) ? 'disabled btn btn-primary' : 'btn btn-primary'); ?>