summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Field/Choice.pm2
1 files changed, 1 insertions, 1 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 });