From 81c13474d68473aa68932c14e6ddaef858a2e91e Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Fri, 25 Aug 2006 04:31:03 +0000 Subject: 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 a=myk MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bugzilla/Bug.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index 65606e3f6..8c61a657b 100755 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -1767,7 +1767,10 @@ sub AUTOLOAD { $attr =~ s/.*:://; return unless $attr=~ /[^A-Z]/; - confess("invalid bug attribute $attr") unless _validate_attribute($attr); + if (!_validate_attribute($attr)) { + require Carp; + Carp::confess("invalid bug attribute $attr"); + } no strict 'refs'; *$AUTOLOAD = sub { -- cgit v1.2.3-24-g4f1b