summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Config
diff options
context:
space:
mode:
authorPami Ketolainen <pami.ketolainen@gmail.com>2015-11-25 18:24:32 +0100
committerDavid Lawrence <dkl@mozilla.com>2015-11-25 18:24:32 +0100
commit7027d7998e3ae3e3b3f5450f28ff50ddca94b951 (patch)
tree4121a6267cd56d623979dc961df8642d5b37322a /Bugzilla/Config
parent24a6c0e8bc5d81f90f582f05bf055570ea5dee50 (diff)
downloadbugzilla-7027d7998e3ae3e3b3f5450f28ff50ddca94b951.tar.gz
bugzilla-7027d7998e3ae3e3b3f5450f28ff50ddca94b951.tar.xz
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.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/Bugzilla/Config/Common.pm b/Bugzilla/Config/Common.pm
index 6f0c0d470..6e8ae7b61 100644
--- a/Bugzilla/Config/Common.pm
+++ b/Bugzilla/Config/Common.pm
@@ -44,7 +44,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'}'";
}