From: Byron Jones Date: Thu, 24 May 2012 06:17:50 +0000 (+0800) Subject: Bug 744691: Throw an error early when calling a method from a non-existent class X-Git-Tag: bugzilla-4.2.2~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2d2fc6373bf882d5ddb16e3136567647cf2ef3ae;p=thirdparty%2Fbugzilla.git Bug 744691: Throw an error early when calling a method from a non-existent class r=dkl, a=LpSolit --- diff --git a/Bugzilla/WebService/Server.pm b/Bugzilla/WebService/Server.pm index 4e03152196..feb80e9d02 100644 --- a/Bugzilla/WebService/Server.pm +++ b/Bugzilla/WebService/Server.pm @@ -25,6 +25,7 @@ use Scalar::Util qw(blessed); sub handle_login { my ($self, $class, $method, $full_method) = @_; + ThrowCodeError('unknown_method', {method => $full_method}) if !$class; eval "require $class"; ThrowCodeError('unknown_method', {method => $full_method}) if $@; return if ($class->login_exempt($method)