diff options
author | Pami Ketolainen <pami.ketolainen@gmail.com> | 2015-11-25 17:24:32 +0000 |
---|---|---|
committer | David Lawrence <dkl@mozilla.com> | 2015-11-25 17:26:10 +0000 |
commit | 3dbd99b27e6c2abba5462f161305b6413d8cb91d (patch) | |
tree | 3f7e078da615439b2134c90704a03800b7909df4 /Bugzilla/Config | |
parent | a42b9586a19f4f8cee577da2ee68981888126ed0 (diff) | |
download | bugs-3dbd99b27e6c2abba5462f161305b6413d8cb91d.tar bugs-3dbd99b27e6c2abba5462f161305b6413d8cb91d.tar.gz bugs-3dbd99b27e6c2abba5462f161305b6413d8cb91d.tar.bz2 bugs-3dbd99b27e6c2abba5462f161305b6413d8cb91d.tar.xz bugs-3dbd99b27e6c2abba5462f161305b6413d8cb91d.zip |
Bug 1227455 - Multiselect parameters (type 'm') are not read correctly from the new JSON storage format
r/a=dkl
Diffstat (limited to 'Bugzilla/Config')
-rw-r--r-- | Bugzilla/Config/Common.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Bugzilla/Config/Common.pm b/Bugzilla/Config/Common.pm index e8dfe3e9d..bd9b0bf84 100644 --- a/Bugzilla/Config/Common.pm +++ b/Bugzilla/Config/Common.pm @@ -45,7 +45,10 @@ sub check_multi { return ""; } elsif ($param->{'type'} eq 'm' || $param->{'type'} eq 'o') { - foreach my $chkParam (split(',', $value)) { + if (ref($value) ne "ARRAY") { + $value = [split(',', $value)] + } + foreach my $chkParam (@$value) { unless (scalar(grep {$_ eq $chkParam} (@{$param->{'choices'}}))) { return "Invalid choice '$chkParam' for multi-select list param '$param->{'name'}'"; } |