aboutsummaryrefslogtreecommitdiffstats
path: root/routers/repo/issue.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/repo/issue.go')
-rw-r--r--routers/repo/issue.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/routers/repo/issue.go b/routers/repo/issue.go
index e3c088d940..343b93e273 100644
--- a/routers/repo/issue.go
+++ b/routers/repo/issue.go
@@ -374,7 +374,10 @@ func ValidateRepoMetas(ctx *context.Context, form auth.CreateIssueForm) ([]int64
}
// Check labels.
- labelIDs := base.StringsToInt64s(strings.Split(form.LabelIDs, ","))
+ labelIDs, err := base.StringsToInt64s(strings.Split(form.LabelIDs, ","))
+ if err != nil {
+ return nil, 0, 0
+ }
labelIDMark := base.Int64sToMap(labelIDs)
hasSelected := false
for i := range labels {