From: lpsolit%gmail.com <> Date: Fri, 25 Aug 2006 04:33:19 +0000 (+0000) Subject: Bug 350083: Bugzilla::Bug::AUTOLOAD tries to find Bugzilla::Bug::confess() when a... X-Git-Tag: bugzilla-2.22.1~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=345f98c818775aa95d1f87c422d93bf90ad54558;p=thirdparty%2Fbugzilla.git Bug 350083: Bugzilla::Bug::AUTOLOAD tries to find Bugzilla::Bug::confess() when a bug method doesn't exist - Patch by Frédéric Buclin r=Colin r=mkanat a=myk --- diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index 14024c2d9d..5c70b8c109 100755 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -1318,7 +1318,10 @@ sub AUTOLOAD { $attr =~ s/.*:://; return unless $attr=~ /[^A-Z]/; - confess ("invalid bug attribute $attr") unless $ok_field{$attr}; + if (!$ok_field{$attr}) { + require Carp; + Carp::confess("invalid bug attribute $attr"); + } no strict 'refs'; *$AUTOLOAD = sub {