From ed6f8b25f0d83d6c1facb5083425e58a88fac787 Mon Sep 17 00:00:00 2001 From: Dave Lawrence Date: Thu, 1 Mar 2012 01:26:23 -0500 Subject: Bug 731416 - Backport 528918 to BMO r=glob --- Bugzilla/Object.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Bugzilla') 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 -- cgit v1.2.3-24-g4f1b