From: lpsolit%gmail.com <> Date: Fri, 4 Jan 2008 00:48:23 +0000 (+0000) Subject: Bug 410660: Updating a bug fails if there is a multi-select custom field - Patch... X-Git-Tag: bugzilla-3.1.3~412 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=14d8113353b88817bee723c040769ed183e4f71e;p=thirdparty%2Fbugzilla.git Bug 410660: Updating a bug fails if there is a multi-select custom field - Patch by Ronaldo Maia r/a=LpSolit --- diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index 5244a21b3d..bfd110ad05 100755 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -1406,8 +1406,15 @@ sub _set_global_validator { my ($self, $value, $field) = @_; my $current = $self->$field; my $privs; - $current = $current->id if ref $current && $current->isa('Bugzilla::Object'); - $value = $value->id if ref $value && $value->isa('Bugzilla::Object'); + + if (ref $current && ref($current) ne 'ARRAY' + && $current->isa('Bugzilla::Object')) { + $current = $current->id ; + } + if (ref $value && ref($value) ne 'ARRAY' + && $value->isa('Bugzilla::Object')) { + $value = $value->id ; + } my $can = $self->check_can_change_field($field, $current, $value, \$privs); if (!$can) { if ($field eq 'assigned_to' || $field eq 'qa_contact') {