From: Peter Gyongyosi Date: Wed, 6 Jul 2011 09:54:17 +0000 (+0200) Subject: Bug 657561: Invalid XMLRPC response generated if an optional custom integer field... X-Git-Tag: bugzilla-4.0.2~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dbb084006887dd3a526b5baf951c7e5fcbbc9a3b;p=thirdparty%2Fbugzilla.git Bug 657561: Invalid XMLRPC response generated if an optional custom integer field is empty (we should return undef rather than an empty string when a field is undefined) r/a=LpSolit --- diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index 7f0191ca4a..d74275f676 100644 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -4082,7 +4082,7 @@ sub AUTOLOAD { *$AUTOLOAD = sub { my $self = shift; - return $self->{$attr} if defined $self->{$attr}; + return $self->{$attr} if exists $self->{$attr}; $self->{_multi_selects} ||= [Bugzilla->get_fields( {custom => 1, type => FIELD_TYPE_MULTI_SELECT })];