summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2012-03-01 07:26:23 +0100
committerDave Lawrence <dlawrence@mozilla.com>2012-03-01 07:26:23 +0100
commited6f8b25f0d83d6c1facb5083425e58a88fac787 (patch)
treece4a600edf9df3758ad02f4ed3ec53acebbc51e1 /Bugzilla
parenta35645338884a632be1c6e8fe389c2a02cb59fa1 (diff)
downloadbugzilla-ed6f8b25f0d83d6c1facb5083425e58a88fac787.tar.gz
bugzilla-ed6f8b25f0d83d6c1facb5083425e58a88fac787.tar.xz
Bug 731416 - Backport 528918 to BMO
r=glob
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Object.pm7
1 files changed, 5 insertions, 2 deletions
diff --git a/Bugzilla/Object.pm b/Bugzilla/Object.pm
index 422a2ffa5..c20cef450 100644
--- a/Bugzilla/Object.pm
+++ b/Bugzilla/Object.pm
@@ -228,8 +228,11 @@ sub match {
}
next;
}
-
- $class->_check_field($field, 'match');
+
+ # It's always safe to use the field defined by classes as being
+ # their ID field. In particular, this means that new_from_list()
+ # is exempted from this check.
+ $class->_check_field($field, 'match') unless $field eq $class->ID_FIELD;
if (ref $value eq 'ARRAY') {
# IN () is invalid SQL, and if we have an empty list