diff options
-rw-r--r-- | Bugzilla/Field/Choice.pm | 2 | ||||
-rw-r--r-- | template/en/default/global/user-error.html.tmpl | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Bugzilla/Field/Choice.pm b/Bugzilla/Field/Choice.pm index 2b6d8195f..52fb7b409 100644 --- a/Bugzilla/Field/Choice.pm +++ b/Bugzilla/Field/Choice.pm @@ -257,7 +257,7 @@ sub _check_sortkey { return 0 if !$value; # Store for the error message in case detaint_natural clears it. my $orig_value = $value; - detaint_natural($value) + (detaint_natural($value) && $value <= MAX_SMALLINT) || ThrowUserError('fieldvalue_sortkey_invalid', { sortkey => $orig_value, field => $invocant->field }); diff --git a/template/en/default/global/user-error.html.tmpl b/template/en/default/global/user-error.html.tmpl index a8eabb0d7..91640fe4a 100644 --- a/template/en/default/global/user-error.html.tmpl +++ b/template/en/default/global/user-error.html.tmpl @@ -577,9 +577,9 @@ [% ELSIF error == "fieldvalue_sortkey_invalid" %] [% title = "Invalid Field Value Sortkey" %] - The sortkey '[% sortkey FILTER html %]' for the - [%+ field.description FILTER html %] field is not a valid - (positive) number. + The sortkey '[% sortkey FILTER html %]' for the + [%+ field.description FILTER html %] field must be an integer + between 0 and [% constants.MAX_SMALLINT FILTER none %]. [% ELSIF error == "fieldvalue_still_has_bugs" %] [% title = "You Cannot Delete This Field Value" %] |