From 4c89a9c33c4c097836f5bfa79cc7e5adc142a2f0 Mon Sep 17 00:00:00 2001 From: Ethan Koenig Date: Thu, 22 Dec 2016 03:58:04 -0500 Subject: Bug fixes and tests for modules/base (#442) Also address other TODOs --- routers/repo/issue.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'routers') 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 { -- cgit v1.2.3